From 842662f3d502cdb9afb11d4bc5b428f2df41e054 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 10 Dec 2017 19:42:25 +0300 Subject: [PATCH] Actually, let's move softly Signed-off-by: fbt --- ssm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ssm b/ssm index e6158d2..ed05ef5 100755 --- a/ssm +++ b/ssm @@ -352,6 +352,15 @@ main() { service_path=( "$XDG_CONFIG_HOME/ssm/services" ) cfg_path=( "$XDG_CONFIG_HOME/ssm" ) + # Warn the user of deprecated stuff. + if [[ -d "$XDG_CONFIG_HOME/ssm/init.d" ]]; then + printf 'WARNING: `%s` was renamed to `%s`! Please move your scripts accordingly!\n' \ + "$XDG_CONFIG_HOME/ssm/init.d" \ + "$XDG_CONFIG_HOME/ssm/services" >&2 + + service_path+=( "$XDG_CONFIG_HOME/ssm/init.d" ) + fi + rundir="$XDG_RUNTIME_DIR/ssm" logdir="$HOME/log/ssm" else @@ -359,6 +368,12 @@ main() { logdir='/var/log/ssm' fi + # Warn the user of deprecated stuff. + if [[ -d "/etc/ssm/init.d" ]]; then + printf 'WARNING: `/etc/ssm/init.d` was renamed to `/etc/ssm/services`! Please move your scripts accordingly!\n' >&2 + service_path+=( "/etc/ssm/init.d" ) + fi + # Common service path service_path+=( '/etc/ssm/services' "$rundir/services" "$usrdir/services" )