Last change
on this file since 9b245b3 was 7125722, checked in by Jim Gifford <clfs@…>, 17 years ago |
Import of Bootscripts
|
-
Property mode
set to
100644
|
File size:
991 bytes
|
Rev | Line | |
---|
[7125722] | 1 | #!/bin/sh
|
---|
| 2 | # Begin $rc_base/init.d/sshd
|
---|
| 3 |
|
---|
| 4 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
| 5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
| 6 |
|
---|
| 7 | #$LastChangedBy: bdubbs $
|
---|
| 8 | #$Date: 2006-04-15 17:34:16 -0500 (Sat, 15 Apr 2006) $
|
---|
| 9 |
|
---|
| 10 | . /etc/sysconfig/rc
|
---|
| 11 | . $rc_functions
|
---|
| 12 |
|
---|
| 13 | case "$1" in
|
---|
| 14 | start)
|
---|
| 15 | boot_mesg "Starting SSH Server..."
|
---|
| 16 | # Also prevent ssh from being killed by out of memory conditions
|
---|
| 17 | loadproc /usr/sbin/sshd
|
---|
| 18 | sleep 1
|
---|
| 19 | echo "-16" >/proc/`cat /var/run/sshd.pid`/oom_adj
|
---|
| 20 | ;;
|
---|
| 21 |
|
---|
| 22 | stop)
|
---|
| 23 | boot_mesg "Stopping SSH Server..."
|
---|
| 24 | killproc /usr/sbin/sshd
|
---|
| 25 | ;;
|
---|
| 26 |
|
---|
| 27 | reload)
|
---|
| 28 | boot_mesg "Reloading SSH Server..."
|
---|
| 29 | reloadproc /usr/sbin/sshd
|
---|
| 30 | ;;
|
---|
| 31 |
|
---|
| 32 | restart)
|
---|
| 33 | $0 stop
|
---|
| 34 | sleep 1
|
---|
| 35 | $0 start
|
---|
| 36 | ;;
|
---|
| 37 |
|
---|
| 38 | status)
|
---|
| 39 | statusproc /usr/sbin/sshd
|
---|
| 40 | ;;
|
---|
| 41 |
|
---|
| 42 | *)
|
---|
| 43 | echo "Usage: $0 {start|stop|reload|restart|status}"
|
---|
| 44 | exit 1
|
---|
| 45 | ;;
|
---|
| 46 | esac
|
---|
| 47 |
|
---|
| 48 | # End $rc_base/init.d/sshd
|
---|
Note:
See
TracBrowser
for help on using the repository browser.