vincss / mcsleepingserverstarter

Put your minecraft server to rest, while SleepingServerStarter is watching !
https://www.spigotmc.org/threads/put-your-server-to-rest-with-sleepingserverstarter.108828/
250 stars 47 forks source link

Run on Raspberry Pi ( wake up a distant computer ) #260

Open TheGrandJaggard opened 2 weeks ago

TheGrandJaggard commented 2 weeks ago

Hi,

I'm wondering whether it's possible for me to run this on a raspberry pi, which will then start the server running on my PC.

Can I maybe change the minecraftCommand setting to run a script which will run the server on the PC? I really want it to be able to wake up the computer from sleep when somebody tries to connect.

Thanks, Jaggard

vincss commented 2 weeks ago

Hi, It would be possible using something like Wake-On-Lan, but it's a very customized script that you would have to do : https://en.wikipedia.org/wiki/Wake-on-LAN

TheGrandJaggard commented 2 weeks ago

Do you know where I could find or how I could write such a script? How would the sleeping server starter know when to start up again?

vincss commented 1 week ago

I guess Google is your friend, and never did that before : https://www.google.com/search?q=linux+script+wol&rlz=1C1GCEB_enBE1087BE1087&oq=linux+script+wol&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRhA0gEINTI1OWowajeoAgCwAgA&sourceid=chrome&ie=UTF-8

Maybe in the script you could do something that wait for the server to be up and then for it to shutdown. Good luck