Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- #
- # chkconfig: - 55 45
- # description: The starling daemon is a network queue service.
- # processname: starling
- # Standard LSB functions
- #. /lib/lsb/init-functions
- # Source function library.
- . /etc/init.d/functions
- # Check that networking is up.
- if [ "$NETWORKING" = "no" ]
- then
- exit 0
- fi
- RETVAL=0
- prog="starling"
- start () {
- echo -n $"Starting $prog: "
- # ensure that /var/run/starling has proper permissions
- chown <%= starling_user %> /var/run/starling
- ulimit -n 8192
- daemon --pidfile /var/run/starling/starling.pid starling -d -u <%= starling_user %> -p <%= starling_port %> -P <%= starling_pid %> -h <%= ipaddress_eth1 %> -l starling-tampopo -vvv -t 300
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/starling
- }
- stop () {
- echo -n $"Stopping $prog: "
- killproc -p /var/run/starling/starling.pid /usr/bin/starling
- RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ] ; then
- rm -f /var/lock/subsys/starling
- rm -f /var/run/starling.pid
- fi
- }
- restart () {
- stop
- start
- }
- # See how we were called.
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status starling
- ;;
- restart|reload|force-reload)
- restart
- ;;
- condrestart)
- [ -f /var/lock/subsys/starling ] && restart || :
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
- exit 1
- esac
- exit $?
Add Comment
Please, Sign In to add comment