You are not logged in.

#1 2010-03-13 12:11:11

tjach
Member
Registered: 2007-09-17
Posts: 22

[solved] Help with startup script

Hello,

After few hours I've installed Etherpad Opensource with external mail support and almost everything. But I would like to start it automatically after boot.
the procedure of starting it up consists with the following steps:

cd /opt/etherpad/etherpad
bin/run-local.sh

I can't start it with one single command because of the limitations of the software.

Adding those line to rc.local doesn't start the script. That's why I've tried starting it with the screen command:

pidof java ||
{
echo "Starting Etherpad"
cd /opt/etherpad/etherpad
screen -d -m bin/run-local.sh
echo "Done"
}

I know that it may look a bit unusual, but it's supposed to work smile First, I'm checking if java is running, if it's not I'm starting etherpad.

But as you know by now - it doesn't work. Any ideas why?

The part with pidof java doesn't seem to be the problem, because the script also doesn't work without it.

Thanks in advance for any help.


---

One more thing: script works perfectly when running manually from console, but refuses to work when invoked by cron or on startup.


___

Found solution. Actually it was Etherpad's fault, I was doing everything all right.

For anybody in the same situation: make sure that all the environmental values are set correctly (e.g. JAVA_HOME, JAVA)

Last edited by tjach (2010-03-13 13:40:18)

Offline

Board footer

Powered by FluxBB