Files
webgui/emhttp/plugins/dynamix.plugin.manager/scripts/plugin_rm
Tom Mortensen f9ec00b488 repo reorg
2023-06-02 12:49:33 -07:00

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