fixed #2101, maybe
This commit is contained in:
parent
5fe6ffbd15
commit
738ecfd77b
|
@ -21,6 +21,17 @@ installdir=/opt/campcaster
|
|||
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ -f $installdir/storageServer.wasMounted ]; then
|
||||
storagedir=$installdir/var/Campcaster/storageServer
|
||||
if [ -d $storagedir.bak ]; then
|
||||
rm -rf $storagedir.bak
|
||||
fi
|
||||
mv -f $storagedir $storagedir.bak
|
||||
mkdir $storagedir
|
||||
mount $storagedir
|
||||
rm $installdir/storageServer.wasMounted
|
||||
fi
|
||||
|
||||
# do post-installation configuration
|
||||
$installdir/bin/postInstallStation.sh --directory=$installdir \
|
||||
--apache-group=www-data \
|
||||
|
|
|
@ -70,11 +70,9 @@ case "$1" in
|
|||
rm -rf $installdir/var/Campcaster/archiveServer/var/stor/*
|
||||
|
||||
storagedir=$installdir/var/Campcaster/storageServer
|
||||
storage_is_local=yes
|
||||
if [ "`mount | grep -o \"on $storagedir \"`" = "on $storagedir " ]; then
|
||||
storage_is_local=no
|
||||
fi
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
if [ -f $installdir/storageServer.wasMounted ]; then
|
||||
rmdir $storagedir
|
||||
else
|
||||
rm -rf $storagedir/var/stor/*
|
||||
fi
|
||||
;;
|
||||
|
|
|
@ -80,11 +80,10 @@ case "$1" in
|
|||
rm -rf $installdir/var/Campcaster/archiveServer/var/trans/*
|
||||
|
||||
storagedir=$installdir/var/Campcaster/storageServer
|
||||
storage_is_local=yes
|
||||
if [ "`mount | grep -o \"on $storagedir \"`" = "on $storagedir " ]; then
|
||||
storage_is_local=no
|
||||
fi
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
umount $storagedir
|
||||
touch $installdir/storageServer.wasMounted
|
||||
else
|
||||
rm -rf $storagedir/var/access/*
|
||||
rm -rf $storagedir/var/trans/*
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue