openssh converted to the new-style buildpkg environment

the script files in meta are unchanged from the last commit in the old tree (now openssh.old)
This commit is contained in:
Tom G. Christensen
2003-07-08 11:39:38 +00:00
committed by tgc
parent 7e2b6e8da7
commit 0f95aec6ee
6 changed files with 346 additions and 0 deletions

40
openssh/src/sshd.init Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/sh
# Script to control ssh server start/stop
# History:
# Please see CVS for history information
pidfile=/var/run/sshd.pid
desc="sshd"
mode=$1
set `/usr/xpg4/bin/id -u`
if [ $1 = "0" ]; then
case $mode in
'start' ) if [ -r $pidfile ]; then
echo "A pidfile was found, trying to stop $desc first"
$0 stop
fi
echo "Starting $desc"
/usr/local/sbin/sshd
;;
'stop' ) if [ -r $pidfile ]; then
echo "Stopping $desc"
kill `cat $pidfile`
else
echo "$desc already stopped (no pid file found)"
fi
;;
'restart') $0 stop
$0 start
;;
*) echo "Usage: $0 {start|stop|restart}"
esac
else
echo "$0: this script must be run as root... fatal error"
fi