333 Posted February 17, 2014 Posted February 17, 2014 Hi, I've gotten help with a restart script on here before but it was for JKA.. I was wondering if someone could assist me in making one for JK2 (I am a super noob VPS user, so not really help. More like make me one xD) The one that I had before worked perfectly and logged, but one disadvantage was I couldn't see what was actually happening in the server. I want to be able to see stuff like this if possible: If not, a regular restart script would be super nice~ Thanks! (Btw, ubuntu 12.10 64 bit if it makes a difference)
eezstreet Posted February 17, 2014 Posted February 17, 2014 not sure why JK2 matters, they use the same restart script for both JK2 and JKA
333 Posted February 21, 2014 Author Posted February 21, 2014 not sure why JK2 matters, they use the same restart script for both JK2 and JKA I want one where I can still view everything going on in the server. The one that I do use just prints a message.
eezstreet Posted February 21, 2014 Posted February 21, 2014 Hmm, I can't quite see that image. When you mean print a message, what do you mean exactly?
Raz0r Posted February 21, 2014 Posted February 21, 2014 Can you post your current script, and the one you used for JA if possible Shadzy likes this
TriForce Posted February 26, 2014 Posted February 26, 2014 http://jediknight3.filefront.com/file/;115795
333 Posted February 28, 2014 Author Posted February 28, 2014 #!/bin/bashecho "Superleet startup script!"status=1while [ $status -ne 0 ]do./linuxjampded +set dedicated "2" +set fs_game "japlus" +exec "server.cfg" >log.txt 2>&1status=$?if [ $status -ne 0 ]thendate=`/bin/date`echo "Server crashed with status "$status" at "$datefidoneecho "Server exited peacefully"
Raz0r Posted February 28, 2014 Posted February 28, 2014 Hah, I think I wrote that one ages ago. It should work fine, and it's intended to be run in a screen session. Try removing the 2>&1 part
Raz0r Posted March 2, 2014 Posted March 2, 2014 Sounds like you edited it from Windows, and the program you used added Windows-style line endings. Try editing it in nano and redoing all the lines (delete, return) It's also a generally bad idea to run things as root or as superuser (sudo) =]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now