recreate omv-mkconf if needed

This commit is contained in:
Aaron Murray 2020-06-23 12:48:42 -05:00
parent c3c0e7de25
commit 4d0a2ca7d4

View File

@ -22,8 +22,15 @@ export LANG=C.UTF-8
declare -i failed=0
mkconf="/usr/sbin/omv-mkconf"
plugins="cups dnsmasq docker-gui domoticz duplicati eyefi ldap letsencrypt mysql nginx openvpn pxe remotedesktop route shellinabox syncthing transmissionbt urbackup-server vdo virtualbox webdav netatalk route"
if [ ! -f "${mkconf}" ]; then
echo "Creating omv-mkconf to help remove plugins"
echo "exit 0" > ${mkconf}
chmod +x ${mkconf}
fi
echo "Purging incompatible plugins ..."
for plugin in ${plugins}; do
pkg="openmediavault-${plugin}"
@ -37,6 +44,10 @@ for plugin in ${plugins}; do
fi
done
if [ -f "${mkconf}" ]; then
rm ${mkconf}
fi
if [ ${failed} -eq 1 ]; then
echo "Failed to remove a plugin. Exiting..."
exit 1