Skip to content
Advertisement

script to check script is running and start it, if it’s stopped

I have a script with this name : Run.sh

I run this script with this command :

JavaScript

I don’t like stop this script but this script Suddenly stops and need run again.

I need a script to check it , if my run.sh stopped , run it again.

this is run.sh codes:

JavaScript

And i want run this script at boot (with screen or tmux) if my server restart

i have Ubuntu 16.04 version

Thank you Ljm Dullaart

Can you help me about this ?

Advertisement

Answer

You should not need to run the complete bash script again. Changing

JavaScript

to

JavaScript

will restart bot.lua everytime it exits.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement