############################################################# ################/etc/rc.d/rc.local########################### ############################################################# #!/bin/sh # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local startup commands in here. Also, if you have # anything that needs to be run at shutdown time you can # make an /etc/rc.d/rc.local_shutdown script and put those # commands in there. # Start Nagios if [ -x /etc/rc.d/rc.nagios ]; then . /etc/rc.d/rc.nagios start fi # Start the SMS daemon: if [ -x /etc/rc.d/rc.smsd ]; then . /etc/rc.d/rc.smsd start fi ############################################################# ################/etc/rc.d/rc.smsd############################ ############################################################# #!/bin/sh # # /etc/rc.d/rc.smsd # # Start/stop/restart the SMS Daemon. # # To make SMSD start automatically at boot, make this # file executable: chmod 755 /etc/rc.d/rc.smsd # smsd_start() { if [ -x /usr/local/bin/smsd ]; then echo "Starting smsd: smsd -u smsd -p X -d smsgw -c localhost -m mysql -b IN -f /var/log/smsdaemon.log &" smsd -u smsd -p smsgw -d smsgw -c localhost -m mysql -b IN -f /var/log/smsdaemon.log & fi } smsd_stop() { echo "Stopping smsd: killall smsd" killall smsd } smsd_restart() { smsd_stop sleep 5 smsd_start } case "$1" in 'start') smsd_start ;; 'stop') smsd_stop ;; 'restart') smsd_restart ;; *) # Default is "start", for backwards compatibility with previous # Slackware versions. This may change to a 'usage' error someday. smsd_start esac ############################################################# ################/etc/rc.d/rc.local_shutdow################### ############################################################# #!/bin/sh # # /etc/rc.d/rc.local_shutdown: Local system shutdown script. . /etc/rc.d/rc.nagios stop . /etc/rc.d/rc.smsd stop ############################################################# ##############ls -la /etc/rc.d | grep -E "local|nagios|smsd"# ############################################################# -rwxr-xr-x 1 root root 444 2008-06-19 09:47 rc.local* -rwxr-xr-x 1 root root 127 2008-06-19 09:45 rc.local_shutdown* -rwxr-xr-x 1 root root 5172 2008-05-06 21:36 rc.nagios* -rwxr-xr-x 1 root root 815 2008-06-19 09:48 rc.smsd*