Last change
on this file since b1bad43 was 1680407, checked in by Jim Gifford <clfs@…>, 17 years ago |
Added Netboot Scripts
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
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 |
|
---|
[1680407] | 13 | pidfile=/var/run/sshd.pid
|
---|
| 14 |
|
---|
[7125722] | 15 | case "$1" in
|
---|
| 16 | start)
|
---|
| 17 | boot_mesg "Starting SSH Server..."
|
---|
| 18 | # Also prevent ssh from being killed by out of memory conditions
|
---|
[1680407] | 19 | loadproc -p $pidfile /usr/sbin/sshd
|
---|
[7125722] | 20 | sleep 1
|
---|
[1680407] | 21 | echo "-16" >/proc/`cat $pidfile`/oom_adj
|
---|
[7125722] | 22 | ;;
|
---|
| 23 |
|
---|
| 24 | stop)
|
---|
| 25 | boot_mesg "Stopping SSH Server..."
|
---|
[1680407] | 26 | killproc -p $pidfile /usr/sbin/sshd
|
---|
[7125722] | 27 | ;;
|
---|
| 28 |
|
---|
| 29 | reload)
|
---|
| 30 | boot_mesg "Reloading SSH Server..."
|
---|
[1680407] | 31 | reloadproc -p $pidfile /usr/sbin/sshd
|
---|
[7125722] | 32 | ;;
|
---|
| 33 |
|
---|
| 34 | restart)
|
---|
| 35 | $0 stop
|
---|
| 36 | sleep 1
|
---|
| 37 | $0 start
|
---|
| 38 | ;;
|
---|
| 39 |
|
---|
| 40 | status)
|
---|
[1680407] | 41 | statusproc -p $pidfile /usr/sbin/sshd
|
---|
[7125722] | 42 | ;;
|
---|
| 43 |
|
---|
| 44 | *)
|
---|
| 45 | echo "Usage: $0 {start|stop|reload|restart|status}"
|
---|
| 46 | exit 1
|
---|
| 47 | ;;
|
---|
| 48 | esac
|
---|
| 49 |
|
---|
| 50 | # End $rc_base/init.d/sshd
|
---|
Note:
See
TracBrowser
for help on using the repository browser.