Auto restart for LGSM/Linux?
Is there anyone who uses LGSM? and do you know how the server restarts itself when it is no longer there?
Do you have to do such a thing and start with screen?

#!/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
clear
while :
do
echo "Starting server...\n"
exec ./rustserver start \
sleep 10
done

Because now I'm doing it with crontab -e (5 03 * * * su - rustserver -c '/home/rustserver/rustserver restart' > /dev/null 2>&1)

Probably most primitive way would be to add a cronjob with the monitor command. Read the docs to know how it behaves and how to config.

https://docs.linuxgsm.com/commands/monitor

qwertyAT

Probably most primitive way would be to add a cronjob with the monitor command. Read the docs to know how it behaves and how to config.

https://docs.linuxgsm.com/commands/monitor

I tried with the monitor but the server does not start it

Works like a charm for me.

How did you test it?

i turned off the server and did ./rustserver m to see if it turns it on but nothing

Did you read the page I did link? I'm sure if you do, you'll figure out what's up.

If you did and still can't figure it out provide more information.