I am running a program on a remote server that I ssh into to update the program or configuration. I run the program in a TMUX window so I can disconnect and do other stuff on the server.
I would like to ensure the program restarts if it fails and if the server reboots. The program does create logs but I sometimes out to the console information I would like to continue to see after a restart.
I have tried a couple of experiments with Systemd configuration using a never ending bash script and then killing it.
I can't seem to determine if the script started again. Following is the systemd config file I am using
Quote:
[Unit]Description=testing resrtart functions
[Service]ExecStart=/home/john/dtest.sh
Restart=on-failure
RestartSec=10s
[Install]WantedBy=multi-user.target
|
Any help is definetly appreciated.