Files
2025-07-25 18:08:10 +07:00

33 lines
547 B
Bash

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting scm"
/usr/bin/scm &
echo $(pgrep scm) > /var/run/scm.pid
check $? "start scm"
return $?
}
stop() {
notify "Stopping scm"
kill $(cat /var/run/scm.pid)
check $? "stop scm"
rm /var/run/scm.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?