webif/CONTROL/preinst
hummypkg 14f4eb0371 attempt to auto-fix package upgrade problem
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3864 2a923420-c742-0410-a762-8d5b09965624
2017-03-01 00:01:50 +00:00

24 lines
412 B
Bash
Executable File

#!/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
if [ ! -f /mod/webif/.pfixpkg ]; then
at now + 1 minute << EOM
diag fixpkg
touch /mod/webif/.pfixpkg
EOM
fi
exit 0