]> andersk Git - gssapi-openssh.git/blame - setup/SXXsshd.in
o Formatting changes to standard output of setup script.
[gssapi-openssh.git] / setup / SXXsshd.in
CommitLineData
03f5c33a 1#!/bin/sh
4bb7c5ae 2#
e0ceafd7 3# Init file for GSI-OpenSSH server daemon
4bb7c5ae 4#
5# chkconfig: 2345 55 25
e0ceafd7 6# description: GSI-OpenSSH server daemon
4bb7c5ae 7#
03f5c33a 8
20bb6dc8 9GLOBUS_LOCATION="@GLOBUS_LOCATION@"
03f5c33a 10export GLOBUS_LOCATION
11
12. ${GLOBUS_LOCATION}/libexec/globus-script-initializer
13. ${libexecdir}/globus-sh-tools.sh
03f5c33a 14
15PID_FILE=${localstatedir}/sshd.pid
16
812abb17 17#
18# SSHD arguments can be added here within the following
19# set of double quotes.
20#
21
22SSHD_ARGS=""
23
03f5c33a 24case "$1" in
306c7e1a 25 start)
26 if [ ! -f $PID_FILE ]; then
cf7f6b8d 27 if [ ! -d $localstatedir ]; then
28 mkdir -p $localstatedir
29 fi
306c7e1a 30 echo "Starting up GSI-OpenSSH sshd server"
812abb17 31 ${sbindir}/sshd $SSHD_ARGS > /dev/null 2>&1 &
306c7e1a 32 if [ $? -ne 0 ] ; then
33 echo "Failed to start up GSI-OpenSSH sshd server"
306c7e1a 34 fi
35 else
36 echo "GSI-OpenSSH sshd is already running..."
37 fi
38 ;;
39
40 stop)
41 if [ -f $PID_FILE ] ; then
cf7f6b8d 42 pid=`cat $PID_FILE`
43 kill -TERM $pid
306c7e1a 44 sleep 2
cf7f6b8d 45 kill -TERM $pid 2> /dev/null
306c7e1a 46 rm -f $PID_FILE
47 fi
48 ;;
03f5c33a 49
fd95e191 50 restart)
51 $0 stop
52 $0 start
53 ;;
54
55 *)
56 echo "Usage: $0 (start|stop|restart)"
306c7e1a 57 exit 1
03f5c33a 58esac
59
60exit 0
This page took 0.059969 seconds and 5 git commands to generate.