Use the "stop" file to kill processes which prevent shutdown

Recommended Posts

Sometimes my server does not restart or shutdown and after a while I found out that still running backup scripts caused this issue. Because of that I created the "stop" file which is automatically executed by Unraid:

touch /boot/config/stop


and pasted the following content:


# -------------------------------------------------
# Kill all processes which prevent shutdown
# -------------------------------------------------
while [ $(pkill -xc rsync) != "0" ]; do logger -t stop "rsync killed"; sleep 2; done
while [ $(pkill -xc rcloneorig) != "0" ]; do logger -t stop "rclone killed"; sleep 2; done


I use the Config File Editor Plugin to edit files:


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.