Afro
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Articles
A20 Bugs
A21 Bugs
Events
Posts posted by Afro
-
-
Hey zombie killers I need some help.
Some background: I'm VERY new to Linux, hosting servers, the game itself etc but I played it recently and LOVED it.
I finally managed to set up a dedicated server for me and my friends. It's running on Debian 11.Now my query, I am wondering if there is anyway to put the pc to sleep when none of us are on and then be able to wake remotely from my android phone and run the server start script when me or my friends wanna play but I'm not home so I don't have to run it 24/7.
I'm assuming doing this will help with the electricity bill haha.
Any help is appreciated!
0
Help with dedicated server
in General Support
Posted
Hey @meganoth, thanks for your reply!
I've managed to set up wake on Lan and now I've been trying to set up running the server start command (./sdtdserver start) on wake (not boot) and server stop (./sdtdserver stop) on sleep with systemd. I think I'm doing something wrong.
I made a text file in systemd/system-sleep called: pre-suspend.sh.
In the file I put these lines:
#!/bin/bash
if [ "${1}" == "pre" ]; then
./sdtdserver stop
elif [ "${1}" == "post" ]; then
./sdtdserver start
fi
I'm pretty sure I've done this wrong, any help would be great, thanks.