mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 09:20:15 -06:00
Merge pull request #1066 from owncloud/runtime-cleanup
This commit is contained in:
@@ -97,7 +97,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
5
changelog/unreleased/runtime-cleanup.md
Normal file
5
changelog/unreleased/runtime-cleanup.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Runtime Cleanup
|
||||
|
||||
Small runtime cleanup prior to Tech Preview release
|
||||
|
||||
https://github.com/owncloud/ocis/pull/1066
|
||||
@@ -86,7 +86,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -81,7 +81,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -101,7 +101,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -34,8 +34,6 @@ var (
|
||||
// Extensions are ocis extension services
|
||||
Extensions = []string{
|
||||
"glauth",
|
||||
"graph",
|
||||
"graph-explorer",
|
||||
"konnectd",
|
||||
"ocs",
|
||||
"onlyoffice",
|
||||
@@ -54,6 +52,8 @@ var (
|
||||
"storage-public-link",
|
||||
"thumbnails",
|
||||
"webdav",
|
||||
//"graph",
|
||||
//"graph-explorer",
|
||||
}
|
||||
|
||||
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
||||
@@ -129,6 +129,11 @@ OUT:
|
||||
func RunService(client *rpc.Client, service string) int {
|
||||
args := process.NewProcEntry(service, os.Environ(), []string{service}...)
|
||||
|
||||
all := append(Extensions, append(dependants, MicroServices...)...)
|
||||
if !contains(all, service) {
|
||||
return 1
|
||||
}
|
||||
|
||||
var reply int
|
||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||
golog.Fatal(err)
|
||||
@@ -159,3 +164,12 @@ func setDefaults() {
|
||||
// registry
|
||||
registry.Name = OwncloudNamespace + "registry"
|
||||
}
|
||||
|
||||
func contains(a []string, b string) bool {
|
||||
for i := range a {
|
||||
if a[i] == b {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -51,7 +51,7 @@ func Execute() error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -87,7 +87,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
@@ -86,7 +86,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
switch err.(type) {
|
||||
case viper.ConfigFileNotFoundError:
|
||||
logger.Info().
|
||||
logger.Debug().
|
||||
Msg("no config found on preconfigured location")
|
||||
case viper.UnsupportedConfigError:
|
||||
logger.Fatal().
|
||||
|
||||
Reference in New Issue
Block a user