Automatically starting MOO on Linux server boot

0 views
Skip to first unread message

Semper Iratus

unread,
Nov 22, 2015, 7:33:28 PM11/22/15
to MOO Talk
Hey guys,

Can't seem to get this to work.

I'm running a MOO on Ubuntu Server 14.04
Right in the folder, all I have to do is sh restart.sh minimal 7777, boots up just fine.

If I add that line in crontab with @reboot, of course it doesn't work - it doesn't find the script
If I add the full path pointing to the restart.sh script, it also doesn't start - it can't find the db
If I add the full path pointing to the restart.sh and the full path pointing to the db, it doesn't return any errors but it also doesn't start the MOO

I tried running it from the root folder in a terminal with -x like

sh -x /path/restart.sh path/minimal 7777

No dice.

I tried sh -x /path/restart.sh path/minimal 7777 and it was telling me that it couldn't find the compress binary
This is normal, compress is old as hell and isn't included in Ubuntu, what's strange is that if I run it directly in the folder with -x, it doesn't return the compress error
But okay, fine, I pulled the line requesting the compress command in restart.sh
Doesn't return an error about compress or anything else, but it ALSO doesn't start the MOO
It seems it will ONLY start if I manually navigate to its folder in term and run it as sh restart.sh minimal 7777

Any of you guys ever experience this?

Wolfgang Faust

unread,
Nov 22, 2015, 7:40:11 PM11/22/15
to Semper Iratus, MOO Talk
This doesn't address your specific error message, but you may find it useful nonetheless:

Cron runs the command in a shell. This means you can use the `cd` builtin and job control metacharacters. My usual approach for things like this is:

@reboot cd /path/to/folder; ./restart.sh

or whatever command is appropriate. This eliminates the need to pass absolute paths everywhere.

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at http://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.



--
The views expressed above are exclusively mine, if anyone's.
Reply all
Reply to author
Forward
0 new messages