Installing Railo with Resin on Slackware 13 - page 4

Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

Start Railo/Resin on bootup

In "/opt/railo/contrib" is an init script. This should already have the correct paths specified. Simply copy the file to "/etc/rc.d/" and name it "rc.resin". Then add the follow to "/etc/rc.d/rc.local"

if [ -x /etc/rc.d/rc.resin ]; then
/etc/rc.d/rc.resin start
fi

You must give rc.resin execute permission

chmod 755 /etc/rc.d/rc.resin

Its also a good idea to use the apache user for railo.

chown -R apache:apache /opt/railo

Note: As of railo-3.1.1 and Resin 3.1.2, the contrib/init.resin file IS NOT CORRECT. Below is mine.

  1. "-pid $PID" is not a valid argument
  2. "start"/"stop" should be after $ARGS
  3. "-java_home" is not a valid argument
  4. "-resin_home" should be "-resin-home"
  5. The "$PID" file is no longer created, so remove all code referencing it.
JAVA_HOME=/usr/lib/java
RESIN_HOME=/opt/railo
export JAVA_HOME RESIN_HOME

USER=

EXE=$RESIN_HOME/bin/httpd.sh

ARGS="-resin-home $RESIN_HOME"
case "$1" in
start)
echo -n "Starting resin: "
if test -n "$USER"; then
su $USER -c "$EXE $ARGS start"
else
$EXE $ARGS start
fi
echo
;;
stop)
echo -n "Shutting down resin: "
$EXE stop
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
1 2 3 4 5

Reader Comments

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing