possible fix for #2101
This commit is contained in:
parent
9cc129a89d
commit
1a35e8d6b8
|
@ -282,6 +282,17 @@ ${install_bin}/createOdbcDataSource.sh --database=${ls_database} \
|
|||
--dbserver=${ls_dbserver}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Check whether the storage server directory has been replaced with a mount
|
||||
# point for an NFS share.
|
||||
#-------------------------------------------------------------------------------
|
||||
storagedir=$installdir/var/storageServer
|
||||
storage_is_local=yes
|
||||
if [ "`mount | grep -o \"on $storagedir \"`" = "on $storagedir " ]; then
|
||||
storage_is_local=no
|
||||
fi
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Setup directory permissions
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -297,15 +308,17 @@ chmod g+sw $install_var_ls/archiveServer/var/access
|
|||
chmod g+sw $install_var_ls/archiveServer/var/trans
|
||||
chmod g+sw $install_var_ls/archiveServer/var/stor/buffer
|
||||
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/stor
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/access
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/trans
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/stor/buffer
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/stor
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/access
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/trans
|
||||
chgrp $apache_group $install_var_ls/storageServer/var/stor/buffer
|
||||
|
||||
chmod g+sw $install_var_ls/storageServer/var/stor
|
||||
chmod g+sw $install_var_ls/storageServer/var/access
|
||||
chmod g+sw $install_var_ls/storageServer/var/trans
|
||||
chmod g+sw $install_var_ls/storageServer/var/stor/buffer
|
||||
chmod g+sw $install_var_ls/storageServer/var/stor
|
||||
chmod g+sw $install_var_ls/storageServer/var/access
|
||||
chmod g+sw $install_var_ls/storageServer/var/trans
|
||||
chmod g+sw $install_var_ls/storageServer/var/stor/buffer
|
||||
fi
|
||||
|
||||
chgrp $apache_group $install_var_ls/htmlUI/var/templates_c
|
||||
chgrp $apache_group $install_var_ls/htmlUI/var/html/img
|
||||
|
@ -379,12 +392,14 @@ ln -s $install_var_ls $www_root/campcaster
|
|||
#-------------------------------------------------------------------------------
|
||||
echo "Initializing database...";
|
||||
|
||||
# create PHP-related database tables
|
||||
cd $install_var_ls/storageServer/var/install
|
||||
# workaround for ticket #2059; restore to "exit 1" after the ticket is closed
|
||||
#php -q install.php || exit 1;
|
||||
php -q install.php || true
|
||||
cd -
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
# create PHP-related database tables
|
||||
cd $install_var_ls/storageServer/var/install
|
||||
# workaround for #2059; restore to "exit 1" after the ticket is closed
|
||||
#php -q install.php || exit 1;
|
||||
php -q install.php || true
|
||||
cd -
|
||||
fi
|
||||
|
||||
# create PHP-related database tables
|
||||
cd $install_var_ls/archiveServer/var/install
|
||||
|
@ -416,13 +431,15 @@ $install_bin/gst-register
|
|||
#-------------------------------------------------------------------------------
|
||||
# Generate a random password for the scheduler's access to the storage
|
||||
#-------------------------------------------------------------------------------
|
||||
grep -q 'ls_scheduler_storage_pass' $install_etc/campcaster-scheduler.xml
|
||||
if [ $? = 0 ]; then
|
||||
SCHEDULER_STORAGE_PASS=`pwgen -N1 -c -n -s`
|
||||
php -q $install_var_ls/storageServer/var/changeSchedulerPassword.php \
|
||||
${SCHEDULER_STORAGE_PASS}
|
||||
sed -i -e "s/ls_scheduler_storage_pass/${SCHEDULER_STORAGE_PASS}/" \
|
||||
$install_etc/campcaster-scheduler.xml
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
grep -q 'ls_scheduler_storage_pass' $install_etc/campcaster-scheduler.xml
|
||||
if [ $? = 0 ]; then
|
||||
SCHEDULER_STORAGE_PASS=`pwgen -N1 -c -n -s`
|
||||
php -q $install_var_ls/storageServer/var/changeSchedulerPassword.php \
|
||||
${SCHEDULER_STORAGE_PASS}
|
||||
sed -i -e "s/ls_scheduler_storage_pass/${SCHEDULER_STORAGE_PASS}/" \
|
||||
$install_etc/campcaster-scheduler.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -199,6 +199,17 @@ echo "Removing symlinks...";
|
|||
rm -f $www_root/campcaster
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Check whether the storage server directory has been replaced with a mount
|
||||
# point for an NFS share.
|
||||
#-------------------------------------------------------------------------------
|
||||
storagedir=$installdir/var/storageServer
|
||||
storage_is_local=yes
|
||||
if [ "`mount | grep -o \"on $storagedir \"`" = "on $storagedir " ]; then
|
||||
storage_is_local=no
|
||||
fi
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Delete data files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -206,9 +217,11 @@ echo "Deleting data files...";
|
|||
|
||||
rm -rf $installdir/var/htmlUI/var/html/img/*
|
||||
rm -rf $installdir/var/htmlUI/var/templates_c/*
|
||||
rm -rf $installdir/var/storageServer/var/stor/*
|
||||
rm -rf $installdir/var/storageServer/var/access/*
|
||||
rm -rf $installdir/var/storageServer/var/trans/*
|
||||
if [ "$storage_is_local" = "yes" ]; then
|
||||
rm -rf $installdir/var/storageServer/var/stor/*
|
||||
rm -rf $installdir/var/storageServer/var/access/*
|
||||
rm -rf $installdir/var/storageServer/var/trans/*
|
||||
fi
|
||||
rm -rf $installdir/var/archiveServer/var/stor/*
|
||||
rm -rf $installdir/var/archiveServer/var/access/*
|
||||
rm -rf $installdir/var/archiveServer/var/trans/*
|
||||
|
|
|
@ -67,8 +67,16 @@ case "$1" in
|
|||
fi
|
||||
|
||||
# remove generated files
|
||||
rm -rf $installdir/var/Campcaster/storageServer/var/stor/*
|
||||
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
|
||||
rm -rf $storagedir/var/stor/*
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
|
@ -76,10 +76,18 @@ case "$1" in
|
|||
rm -rf $installdir/etc/pear.conf
|
||||
rm -rf $installdir/var/Campcaster/htmlUI/var/html/img/*
|
||||
rm -rf $installdir/var/Campcaster/htmlUI/var/templates_c/*
|
||||
rm -rf $installdir/var/Campcaster/storageServer/var/access/*
|
||||
rm -rf $installdir/var/Campcaster/storageServer/var/trans/*
|
||||
rm -rf $installdir/var/Campcaster/archiveServer/var/access/*
|
||||
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
|
||||
rm -rf $storagedir/var/access/*
|
||||
rm -rf $storagedir/var/trans/*
|
||||
fi
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
|
|
Loading…
Reference in New Issue