tag:help-archives.hannonhill.com,2010-02-09:/discussions/installation/3-start-cascade-on-server-rebootCascade CMS: Discussion 2011-04-07T22:11:52Ztag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-07T19:26:35Z2010-05-07T19:44:00ZStart Cascade on Server Reboot<div><p>I'm not sure about the specifics of SuSE 11 but usually, you can
add something like:<br></p>
<pre>
<code>sudo -u <cascade_user> /path/to/cascade/cascade.sh start</code>
</pre>
<p>in the <code>/etc/rc.local</code> file. You'll need to make sure
that the <code>$JAVA_HOME</code> system variable is set in the
cascade.sh script.</p></div>Bradley Wagnertag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-07T21:27:23Z2010-05-07T21:27:23ZStart Cascade on Server Reboot<div><p>Hmmm, unfortunately I do not have a /etc/rc.local file. Any
other ideas? I'm going to keep playing around with it.</p></div>Kristag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-10T18:42:38Z2010-05-10T18:42:38ZStart Cascade on Server Reboot<div><p>Ok, try placing a script like the following in your
<code>/etc/init.d</code> directory and make sure it has executable
permissions.</p>
<pre>
<code>#!/bin/bash
# Cascade startup script
# chkconfig: 345 90 90
# description: Cascade Startup Script
CASCADE_HOME=/path/to/cascade
CASCADE_BIN=$CASCADE_HOME/bin
start() {
echo "Starting Cascade: "
if [ "x$USER" != "x$RUN_AS_USER" ]; then
su - $RUN_AS_USER -c "$CASCADE_HOME/cascade.sh start"
else
$CASCADE_HOME/cascade.sh start
fi
echo "done."
}
stop() {
echo "Shutting down Cascade: "
if [ "x$USER" != "x$RUN_AS_USER" ]; then
su - $RUN_AS_USER -c "$CASCADE_HOME/cascade.sh stop"
else
$CASCADE_HOME/cascade.sh stop
fi
echo "done."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0</code>
</pre></div>Bradley Wagnertag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-10T19:42:03Z2010-05-10T19:42:03ZStart Cascade on Server Reboot<div><p>YES!!! THANK YOU!!! I've been beating my head against the wall
all day on this. I knew what I had to do (i.e. build that script
and put in init.d) but trying to read through the
/etc/init.d/skeleton file to learn how to write that script was
killing me.</p>
<p>Thanks again,<br>
Kris</p></div>Kristag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-10T20:39:01Z2010-05-10T20:40:04ZStart Cascade on Server Reboot<div><p>One final note which may be specific to my environment but
thought I would throw it out there for anyone else that may have
this problem.</p>
<p>You have to edit the<br>
<code>/etc/init.d/.depend.start</code></p>
<p>file by adding the name of your script, I called it cascade, to
the TARGETS list. You also have to add symbolic links to the
appropriate runlevel, I chose 3, to your script. Do this by adding
symbolic links to your cascade script in<br>
<code>/etc/init.d/rc3.d</code></p>
<p>called KXXcascade and SXXcascade. Replace the "XX" in each link
with the order of importance where you want them to start be
called. I didn't see much difference when I moved the numbers
around but I used K01 and S10 which placed them just above apache2
in my installation. My reasoning for this was that I was having
some issues with Cascade not starting manually after Apache had
started so I just wanted to make sure it started before Apache,
though even if I used a number higher than Apache, Cascade still
started first so ...</p>
<p>Hope that helps someone else.</p>
<p>Kris</p></div>Kristag:help-archives.hannonhill.com,2010-02-09:Comment/16274882010-05-10T21:00:51Z2010-05-10T21:00:51ZStart Cascade on Server Reboot<div><p>Thanks for that information Kris!</p></div>Tim