Forum: Ruby on Rails Starling Service

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
TomRossi7 (Guest)
on 2009-03-13 19:42
(Received via mailing list)
Does anyone know a graceful way to stop the Starling service?  I can't
seem to find any documentation and have just been issuing a kill
command on the pid.

Thanks,
Tom
Freddy A. (Guest)
on 2009-03-13 21:08
(Received via mailing list)
#!/bin/sh
### BEGIN INIT INFO
# Provides:          starling
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: starling initscript
# Description:       starling
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions



DAEMON=starling
DAEMON_PATH=/usr/local/bin/
SCRIPT_NAME=/etc/init.d/starling
CONFIG_PATH=/var/www/site/current/config/production-starling.yml

start()
{
        echo -n $"Starting $DAEMON: "
        daemon $DAEMON_PATH$DAEMON start -f $CONFIG_PATH

        touch /var/lock/subsys/$DAEMON
        echo
}

stop()
{
        echo -n $"Shutting down $DAEMON: "
        killproc $DAEMON

        rm -f /var/lock/subsys/$DAEMON
        echo
}
# Exit if the package is not installed
[ -x "$DAEMON_PATH$DAEMON" ] || exit 0

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  *)
        echo "Usage: $SCRIPT_NAME {start|stop|restart}" >&2
        exit 3
        ;;
esac

:
tomrossi7 (Guest)
on 2009-03-16 17:15
(Received via mailing list)
Freddy,

I'm not sure this script will work.  There is no /etc/init.d/starling
script?

Thanks,
Tom
This topic is locked and can not be replied to.