did a little testing, and reworked my scripts for ubuntu. either ubuntu does things a little differently, or my system is just really old and not running the same versions or whatever. anyway, here it goes:
awakening_on_boot.sh:
#!/bin/sh
sudo -u awakening -c "/nordock/awakening/start-startup" &
ubuntu didn't like using "su" and prefers sudo instead, and then it was choking on my earlier use of "> /tmp/logfile" redirect.
start-startup.sh:
#!/bin/sh
screen -A -d -m -S awakening1 bash -c '/nordock/awakening/wrapper.sh; exec bash'
screen wanted the command run in a shell, which i'm a little confused about because wrapper.sh should already have been launching it in a shell. but i digress and bear with me here.
wrapper.sh:
#!/bin/sh
while true
do
/nordock/awakening/nwnstartup.sh
done
this puts your nwnstartup.sh into a while loop, meaning you can kill the nwn server and it will automatically restart it when it dies. your can remove the while loop if you want it to die and stay dead.
then, just make sure you have done a "chmod 755" on all the files to make them executable.
Modifié par acomputerdood, 25 juin 2012 - 09:46 .