4 ms·
Add it within a infinitive loop + `sleep 10` and now it automatically restarts if it crashes too! :)
by capableweb 4y ago
Add it within a infinitive loop + `sleep 10` and now it automatically restarts if it crashes too! :)
- simplerhosting 4y agohaha, exactly what I've been doing (yes, sleep 10 as well!) I also added bubblewrap for security and wrapped it all up in a nice script to list/stop/start services, see https://tobykurien.com/simpler-linux-selfhosting/ https://tobykurien.com/simpler-linux-selfhosting/
- opan 4y agoI've started doing this with a few programs using sleep 1 and a while loop. First was ncmpcpp as it would declare itself too small and quit sometimes when my terminal with tmux resized, this way it'd either reopen when I adjusted pane sizes to fix it or when I restored the whole window to the other size. Next I did it for stig because I'd often press q to quit by accident or because it occasionally hits an issue where you can't view a torrent's detailed info anymore, fixed by a restart. Lastly for the aerc mail client which will frequently stop being able to reach mail servers and tell me I can't archive mail or something, so I just quit it and now it restarts (not sure if there's another way to make it reconnect).