update plugin

This commit is contained in:
dmacias72 2016-03-11 18:35:29 -07:00
parent 38918c7bbd
commit f21ee057bf

View File

@ -144,20 +144,14 @@ if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
rm &plgPATH;/&plgNAME;.md5 rm &plgPATH;/&plgNAME;.md5
exit 1 exit 1
else else
#remove old plugin name directory #remove old plugin and move old files
if [ -d /usr/local/emhttp/plugins/shellinabox ]; then OLDPLG="/boot/config/plugins/shellinabox-plugin"
rm -rf /usr/local/emhttp/plugins/shellinabox [ -d /usr/local/emhttp/plugins/shellinabox ] && rm -rf /usr/local/emhttp/plugins/shellinabox
fi [ -d /usr/local/emhttp/plugins/shellinabox-plugin ] && rm -rf /usr/local/emhttp/plugins/shellinabox-plugin
#remove old plugin name directory [ -f $OLDPLG/shellinabox-plugin.cfg ] && mv -f $OLDPLG/shellinabox-plugin.cfg &plgPATH;/cmdline.cfg
if [ -d /usr/local/emhttp/plugins/shellinabox-plugin ]; then [ -f $OLDPLG/home_directory.tar.gz ] && mv -f $OLDPLG/home_directory.tar.gz &plgPATH;/home_directory.tar.gz
rm -rf /usr/local/emhttp/plugins/shellinabox-plugin [ -d "$OLDPLG" ] && rm -rf $OLDPLG
fi [ -f $OLDPLG.plg ] && rm -rf $OLDPLG.plg
if [ -d /boot/config/plugins/shellinabox-plugin ]; then
rm -rf /boot/config/plugins/shellinabox-plugin
fi
if [ -f /boot/config/plugins/shellinabox-plugin.plg ]; then
rm -rf /boot/config/plugins/shellinabox-plugin.plg
fi
# upgrade package # upgrade package
upgradepkg --install-new &plgPATH;/&plgNAME;.txz upgradepkg --install-new &plgPATH;/&plgNAME;.txz