diff --git a/subcommands/common_config.go b/subcommands/common_config.go index 8fe65429..3b645b4f 100644 --- a/subcommands/common_config.go +++ b/subcommands/common_config.go @@ -235,6 +235,14 @@ func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reporte fmt.Printf("Setting apps to [%s]\n", opts.UpdateApps) sota.Set("pacman.docker_apps", opts.UpdateApps) sota.Set("pacman.compose_apps", opts.UpdateApps) + if strings.TrimSpace(opts.UpdateApps) == "-" { + if sota.Has("pacman.docker_apps") { + DieNotNil(sota.Delete("pacman.docker_apps")) + } + if sota.Has("pacman.compose_apps") { + DieNotNil(sota.Delete("pacman.compose_apps")) + } + } changed = true } if opts.UpdateTag != "" && configuredTag != opts.UpdateTag { diff --git a/subcommands/config/updates.go b/subcommands/config/updates.go index 26a57315..7e6872d3 100644 --- a/subcommands/config/updates.go +++ b/subcommands/config/updates.go @@ -24,7 +24,15 @@ in a device group. When run without options, prints out the current configuratio fioctl config updates --group beta --apps shellhttpd # Set the docker apps and the tag for devices: - fioctl config updates --group beta --apps shellhttpd --tag master`, + fioctl config updates --group beta --apps shellhttpd --tag master + + # Set the docker apps to none for devices, this will make the device run no apps: + fioctl config updates --apps , + + # Set the docker apps to inherit from their parent, meaning: + # If for a device apps are not set - all apps are installed +  # If for a device apps are set - those apps are installed + fioctl config updates --apps -`, } cmd.AddCommand(configUpdatesCmd) configUpdatesCmd.Flags().StringP("group", "g", "", "Device group to use") diff --git a/subcommands/devices/config_updates.go b/subcommands/devices/config_updates.go index 23480da3..f98d70f5 100644 --- a/subcommands/devices/config_updates.go +++ b/subcommands/devices/config_updates.go @@ -26,7 +26,16 @@ currently configured and reporting.`, # Set the docker apps and the tag: fioctl devices config updates --apps shellhttpd --tag master -`, + + # Set the docker apps to none, meaning it will run no apps: + fioctl devices config updates --apps , + + # Set the docker apps to inherit from their parent, meaning: + # If for a device apps are not set - all apps are installed + #  If for a device apps are set* - only those apps are installed + # + # * It can be set at the individual device level, or at a device group level + fioctl devices config updates --apps -`, } configCmd.AddCommand(configUpdatesCmd) configUpdatesCmd.Flags().StringP("tag", "", "", "Target tag for device to follow")