Restarter

Started by Cool, Jul 26, 2016, 08:58 AM

Previous topic - Next topic

Cool

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

Anik

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

KAKAN

A server won't crash by itself, you need to find the root cause of the crash and fix it.
oh no

EK.IceFlake

for windows
:top
server64.exe
goto top
and save it as anyname.cmd
then open it

KAKAN

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/
oh no

EK.IceFlake

It worked for me...

Kewun

it works, no "Shall we terminate this app? y/n"

tested for lu serv.

KAKAN

oh no

Thijn

Quote from: KAKAN on Jul 31, 2016, 06:36 AM
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/
If it works without shady programs, why bother installing one?

Kewun

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?

Thijn

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

aXXo

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.

Cool

Topic Locked.
Or some one will bump it again