Created
January 20, 2020 14:19
-
-
Save apotox/5a81801075a758af45d58e479e4b3fc6 to your computer and use it in GitHub Desktop.
restart a Linux process in a background Screen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#restart a process in a background Screen. | |
ps aux | awk '/process_filename/ {print}' | awk '{print $2}' | xargs kill -SIGTERM | |
echo "restarting process_filename.." | |
screen -r <screen_id> -X stuff $"/path/to/process_filename -params=123\n" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment