Jump to content

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

Featured Replies

Posted

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:

#!/bin/bash

# -------------------------------------------------
# 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:

2053215162_2021-08-1614_35_56.png.3b84ca14bef71acee96b5e8281a9828f.png

  • 2 years later...

thank you so much!! 

mounting rclone prevents me from doing proper restart, but with this, problem solved.

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.

Guest
Reply to this topic...