Changeset - de10e84d4964
[Not reviewed]
default
0 0 1
Ethan Zonca (ethanzonca) - 15 years ago 2010-09-04 01:52:26
e@ethanzonca.com
Added sample initscript for simpleslave. Todo: parse conf files for info, etc
1 file changed with 55 insertions and 0 deletions:
0 comments (0 inline, 0 general)
distrensimpleslave-init
Show inline comments
 
new file 100755
 
#!/bin/bash
 
#
 
# Startup script for DistRen SimpleSlave
 
#
 
# chkconfig: 35 90 12
 
# description: Distren SimpleSlave Client
 
# processname: distrensimpleslave
 

	
 
# Source function library
 
. /etc/rc.d/init.d/functions
 

	
 
prog="DistRen SimpleSlave"
 
process="distrensimpleslave"i
 
args=""
 

	
 
logfile="/var/log/distrensimpleslave"
 
binary="/usr/bin/distrensimpleslave $args 2>$logfile &"
 
lockfile="/var/lock/subsys/distrensimpleslave"
 

	
 
start() {
 
        echo -n $"Starting $prog: "
 
        daemon $binary
 
        touch $lockfile
 
        success $"simpleslave startup"
 
        echo
 
}
 

	
 
stop() {
 
        echo -n $"Shutting down $prog: "
 
        killproc $binary
 
        rm -f $lockfile
 
        echo
 
}
 

	
 
# Logic
 
case "$1" in
 
  start)
 
        start
 
        ;;
 
  stop)
 
        stop
 
        ;;
 
  status)
 
        status $process
 
        ;;
 
  restart|reload|condrestart)
 
        stop
 
        start
 
        ;;
 
  *)
 
        echo $"Usage: $0 {start|stop|restart|reload|status}"
 
        
 
esac
 

	
 
exit 0
0 comments (0 inline, 0 general)