The RServe Startup File

#! /bin/sh
# chkconfig: 2345 99 01
# description: Rserve, /etc/init.d/rserve

case "$1" in
  start)
        echo -n "Starting Rserve daemon: "
        R CMD Rserve
        echo "."
        ;;
  stop)
        echo -n "Stopping Rserve daemon: "
        killall -s 9 Rserve
        echo "."
        ;;
  restart)
        echo -n "Stopping Rserve daemon: "
        killall -s 9 Rserve
        echo "."
        echo -n "Starting Rserve daemon: "
        R CMD Rserve
        echo "."
        ;;
  *)
        echo "Usage: /etc/init.d/rserve {start|stop|restart}"
        exit 1
esac

exit 0