mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 22:19:58 -06:00
Added: kill open shell to allow unmounting of array
This commit is contained in:
5
plugins/dynamix/event/unmounting_disks/kill_shell
Normal file
5
plugins/dynamix/event/unmounting_disks/kill_shell
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# kill any open shell which prevents unmounting of array
|
||||
for PID in $(lsof /mnt/disk[0-9]* /mnt/cache /mnt/user /mnt/user0 2>/dev/null|grep -vP '^(lsof|grep|awk|COMMAND)'|awk '{print $2}'); do
|
||||
kill -9 $PID 1>/dev/null 2>&1
|
||||
done
|
||||
Reference in New Issue
Block a user