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