[Rails] Re: Starling Service

2009-03-16 Thread tomrossi7

Freddy,

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

Thanks,
Tom

On Mar 13, 3:08 pm, Freddy Andersen  wrote:
> #!/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
>
> :
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Starling Service

2009-03-13 Thread Freddy Andersen

#!/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

:

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---