Skip to content

Commit

Permalink
add last ditch test to check that docroot isn't bad
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Mar 8, 2012
1 parent f3b9db9 commit 5f5d5d0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions etc/chumby-netvserver.sh
Expand Up @@ -2,6 +2,21 @@

case "$1" in
start)
# sanity check symlink and reset if it's bad
if [ ! -e /media/storage/docroot ]; then
mount -o remount,rw /
rm -f /www/netvserver
ln -s /usr/share/netvserver/docroot /www/netvserver
mount -o remount,ro /
else
if [ ! -e /media/storage/docroot/index.html ]; then
mount -o remount,rw /
rm -f /www/netvserver
ln -s /usr/share/netvserver/docroot /www/netvserver
mount -o remount,ro /
fi
fi

# Check /psp/homepage and set docroot accordingly
/usr/share/netvserver/docroot/scripts/psphomepage.sh >> /var/log/cron_psphomepage.log 2>&1

Expand Down

0 comments on commit 5f5d5d0

Please sign in to comment.