From 7c584eb8eecf05d43445b4b4804fe89c632775b5 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 24 Jan 2021 19:36:37 +0300 Subject: [PATCH] service path Signed-off-by: fbt --- ssm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ssm b/ssm index 5711b54..261d967 100755 --- a/ssm +++ b/ssm @@ -677,14 +677,6 @@ case "$0" in (*) _self = "$PWD/$0";; esac -# Warn the user of deprecated stuff. -for p in "/etc/ssm/init.d" "$XDG_CONFIG_HOME/ssm/init.d"; do - if [[ -d "$p" ]]; then - printf 'WARNING: `%s` was renamed to `%s`! Please move your scripts accordingly!\n' "$p" "${p%init.d}services" >&2 - service_path += "$p" - fi -done - # Source the config if cfg_file is file; then source "$cfg_file" || die 37 "Failed to load config: $cfg_file" @@ -746,7 +738,11 @@ for d in "$rundir" "$rundir/current" "$logdir"; do done # Common service path -service_path += "$rundir/current" "$XDG_CONFIG_HOME/ssm/services" '/etc/ssm/services' "$usrdir/services" +if (( UID )); then + service_path += "$rundir/current" "$XDG_CONFIG_HOME/ssm/services" '/etc/ssm/services' "$usrdir/services" +else + service_path += "$rundir/current" '/etc/ssm/services' "$usrdir/services" +fi # Special actions if flag_list_services; then