]> "https://github.com/&author;/&name;/archive/&version;.tar.gz" if [ ! -d &emhttp; ]; then mkdir -p &emhttp; fi #rename old plugin to new if [ -f /boot/config/plugins/virtman/virtman.png ]; then mv /boot/config/plugins/virtman &plugin;.old mkdir -p &plugin; mv &plugin;.old/virtman.img &plugin;/virtMan.img mv &plugin;.old/virtman.cfg &plugin;/virtMan.cfg fi tar -zxf &plugin;/&name;-&version;.tar.gz --strip=1 -C &emhttp;/ find &plugin; -type f -iname "*.tar.gz" ! -iname "&name;-&version;.tar.gz" -delete cp -nr /usr/local/emhttp/plugins/&name;/&name; /boot/config/plugins # mount conf image if not already mounted if [ ! "$(mount | grep &name;.img)" ]; then mount -t ext4 &plugin;/&name;.img /etc/libvirt fi rm -rf &emhttp; rm -f &plugin;/&name;-&version;.tar.gz if [ "$(mount | grep virtMan.img)" ]; then umount /etc/libvirt fi > "$CFGFILE" rm /tmp/hp-chkconf ]]>