mirror of
https://github.com/unraid/webgui.git
synced 2025-12-31 14:40:36 -06:00
19 lines
423 B
Bash
Executable File
19 lines
423 B
Bash
Executable File
#!/bin/bash
|
|
|
|
write(){
|
|
for message in "$@"; do
|
|
curl -sfd "$message" --unix-socket /var/run/nginx.socket http://localhost/pub/plugins?buffer_length=1 >/dev/null 2>&1
|
|
done
|
|
}
|
|
|
|
# put some restrictions on 'delete'
|
|
if [[ $1 == /boot/config/plugins-error/* || $1 == /boot/config/plugins-stale/* ]]; then
|
|
text="Deleting $1 ..."
|
|
if [[ -z $2 ]]; then
|
|
echo "$text"
|
|
else
|
|
write "$text " "_DONE_" ""
|
|
fi
|
|
rm $1
|
|
fi
|