From 3e15a2d52f4099697039436e1401e6773f415ae6 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 20 Oct 2025 12:42:31 +0000 Subject: [PATCH] fix(action): correct message about config reload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The daemon already has automatic config file watching and reloads changes without requiring a restart. Updated action handler messages to correctly reflect this behavior. Changed: - 'Restart service to apply changes: nupst service restart' → 'Changes saved and will be applied automatically' The config file watcher (daemon.ts:986) uses Deno.watchFs() to monitor /etc/nupst/config.json and automatically calls reloadConfig() when changes are detected. No restart needed. --- ts/cli/action-handler.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ts/cli/action-handler.ts b/ts/cli/action-handler.ts index b06e80c..2a4ced4 100644 --- a/ts/cli/action-handler.ts +++ b/ts/cli/action-handler.ts @@ -152,10 +152,7 @@ export class ActionHandler { logger.log(''); logger.success(`Action added to ${targetType} ${targetName}`); - logger.log(''); - logger.log( - ` ${theme.dim('Restart service to apply changes:')} ${theme.command('nupst service restart')}`, - ); + logger.log(` ${theme.dim('Changes saved and will be applied automatically')}`); logger.log(''); } finally { rl.close(); @@ -241,10 +238,7 @@ export class ActionHandler { ` ${theme.dim('Thresholds:')} Battery: ${removedAction.thresholds.battery}%, Runtime: ${removedAction.thresholds.runtime}min`, ); } - logger.log(''); - logger.log( - ` ${theme.dim('Restart service to apply changes:')} ${theme.command('nupst service restart')}`, - ); + logger.log(` ${theme.dim('Changes saved and will be applied automatically')}`); logger.log(''); } catch (error) { logger.error(