3 # Init file for PlanetLab OpenSSH server daemon (copied from standard
4 # sshd init file, minor modifications made).
6 # chkconfig: 2345 56 25
7 # description: PlanetLab OpenSSH server daemon
10 # config: /etc/ssh/ssh_host_key
11 # config: /etc/ssh/ssh_host_key.pub
12 # config: /etc/ssh/ssh_random_seed
13 # config: /etc/ssh/sshd_config
14 # pidfile: /var/run/pl_sshd.pid
16 # source function library
17 . /etc/rc.d/init.d/functions
19 # pull in sysconfig settings
20 [ -f /etc/sysconfig/pl_sshd ] && . /etc/sysconfig/pl_sshd
25 # Some functions to make the below more readable
26 SSHD=/usr/local/sbin/pl_sshd
27 PID_FILE=/var/run/pl_sshd.pid
29 do_restart_sanity_check()
33 if [ ! "$RETVAL" = 0 ]; then
34 failure $"Configuration file or keys are invalid"
41 echo -n $"Starting $prog:"
42 initlog -c "$SSHD $OPTIONS" && success || failure
44 [ "$RETVAL" = 0 ] && touch /var/lock/subsys/pl_sshd
50 echo -n $"Stopping $prog:"
53 [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/pl_sshd
59 echo -n $"Reloading $prog:"
80 if [ -f /var/lock/subsys/pl_sshd ] ; then
81 do_restart_sanity_check
82 if [ "$RETVAL" = 0 ] ; then
95 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"