hello i have a vcmp server and its hosted on vps sometimes its got crashed so i want to do somthing like auto restart is it posible
for linux
#!/bin/bash
ulimit -c unlimited
while true; do /dirctorty/of/server; done
and save it as anyname.sh . then give the file 755 permission
A server won't crash by itself, you need to find the root cause of the crash and fix it.
for windows
:top
server64.exe
goto top
and save it as anyname.cmd
then open it
Quote from: EK.CrystalBlue on Jul 26, 2016, 12:55 PMfor windows
:top
server64.exe
goto top
and save it as anyname.cmd
then open it
That does not work, I've tried. It will poke you with something like "Shall we terminate this app?(Y/N)"
It won't restart automagically.
Better, pick one from here( windows ): https://www.raymond.cc/blog/keep-application-running-by-automatically-rerun-when-closed/
It worked for me...
it works, no "Shall we terminate this app? y/n"
tested for lu serv.
Quote from: Kewun on Jul 31, 2016, 06:19 AMit works, no "Shall we terminate this app? y/n"
tested for lu serv.
Quote from: KAKAN on Jul 26, 2016, 01:07 PMBetter, pick one from here( windows ): https://www.raymond.cc/blog/keep-application-running-by-automatically-rerun-when-closed/
Quote from: KAKAN on Jul 31, 2016, 06:36 AMQuote from: Kewun on Jul 31, 2016, 06:19 AMit works, no "Shall we terminate this app? y/n"
tested for lu serv.
Quote from: KAKAN on Jul 26, 2016, 01:07 PMBetter, pick one from here( windows ): https://www.raymond.cc/blog/keep-application-running-by-automatically-rerun-when-closed/
If it works without shady programs, why bother installing one?
i have a question for autorestarter for linux
#!/bin/bash
ulimit -c unlimited
while true; do /dirctorty/of/server; done
how i can then stop the auto restarter?
If you're running that in a screen, just press CTRL+C a few times (first to kill the server, then to kill the restarter script). If you're having trouble, try adding a sleep to the loop like so:
while true; do /dirctorty/of/server; sleep 1; done
Quote from: Kewun on Oct 26, 2016, 12:37 PMhow i can then stop the auto restarter?
Use the command 'top' or 'ps -aux' to list all running processes.
Use 'kill' command with the PID of the restarter .sh script.
Topic Locked.
Or some one will bump it again