Files
initscripts/usr/lib/init/services/sshd.service
T
2024-11-01 15:33:36 +07:00

33 lines
548 B
Desktop File
Executable File

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