source: bootscripts-standard/cblfs/init.d/sshd@ 78b069e

Last change on this file since 78b069e was 7df280d, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Change /bin/sh to /bin/bash in the bootscripts because the bootscripts use bashisms. Having ash linked to sh will cause errors. Thanks to Bigdassaved for providing the diff and Copper for bring up the issue.

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