python manage.py start
python manage.py stop doesnt work
also ingame /stop /shutdown /admin shutdown etc. not working .....
[SOLVED] How to stop and shutdown pyplaneet and server ?
Moderators: TheM, toffe, NADEO
[SOLVED] How to stop and shutdown pyplaneet and server ?
To join my TM Servers, search for: bestnoob 

- toffe
- Posts: 782
- Joined: 15 Jun 2013, 10:57
- Manialink: maniaflash?toffe
- Location: The Netherlands
- Contact:
Re: How to stop and shutdown pyplaneet and server ?
You have to stop the script by killing or sending the sigint signal. For example you can Ctrl+C the start process, or if you start it in the background kill the main PID (but don't kill the subprocesses).
ManiaCalendar: http://maniacalendar.com / manialink
ManiaCDN: topic
PyPlanet: Python Server Controller
ManiaCDN: topic
PyPlanet: Python Server Controller

- toffe
- Posts: 782
- Joined: 15 Jun 2013, 10:57
- Manialink: maniaflash?toffe
- Location: The Netherlands
- Contact:
Re: How to stop and shutdown pyplaneet and server ?
If you kill the subprocess the god might restart the child, and thus won't stop the main god process. If you send a SIGINT to the god process it will carefully try to shut down the child processes.
ManiaCalendar: http://maniacalendar.com / manialink
ManiaCDN: topic
PyPlanet: Python Server Controller
ManiaCDN: topic
PyPlanet: Python Server Controller

Re: How to stop and shutdown pyplaneet and server ?
Oh okay. So i could reuse the pyplanet.pid of each server but instead of the -9 signal i should use -2 for the kill command. As of now what's done is for instance:
What it would become would be something like:
Edit @Toffe (Below): Ahah okay. Well if i've some time i'll give it a try and report back, thanks anyway
.
Code: Select all
for pid in $(ps -fu "$TM_USER" | grep -e "python" -e "rpg${SRV_SUFFIX}_" | awk '{print $2}'); do kill -9 $pid; done > /dev/null
Code: Select all
kill -2 $(cat $TM_DIR/rpg${SRV_SUFFIX}_server/pyplanet.pid) > /dev/null

Last edited by Harest on 15 Nov 2019, 18:59, edited 3 times in total.
- toffe
- Posts: 782
- Joined: 15 Jun 2013, 10:57
- Manialink: maniaflash?toffe
- Location: The Netherlands
- Contact:
Re: How to stop and shutdown pyplaneet and server ?
Could you try that, it should work, but however, due to some annoying changes it could be that it doesn't work anymore.
ManiaCalendar: http://maniacalendar.com / manialink
ManiaCDN: topic
PyPlanet: Python Server Controller
ManiaCDN: topic
PyPlanet: Python Server Controller

Who is online
Users browsing this forum: No registered users and 1 guest