webif/CONTROL/preinst

24 lines
439 B
Plaintext
Raw Normal View History

#!/bin/sh
# Handle moving the legacy /var/mongoose directory to /webif..
if [ -h /mod/webif -a -d /mod/var/mongoose -a ! -h /mod/var/mongoose ]; then
echo "Relocating web interface files..."
cd /mod
rm webif || exit 1
mv var/mongoose webif || exit 1
cd var
ln -s ../webif mongoose
fi
2017-08-25 19:19:52 +00:00
if [ ! -f /mod/webif/.pfixpkg -a -x /mod/bin/at ]; then
/mod/bin/at now + 1 minute << EOM
diag fixpkg
touch /mod/webif/.pfixpkg
EOM
fi
exit 0