From 52b26097816ab71992204a0898661e4a5a540441 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Wed, 6 Dec 2006 09:53:03 +0000 Subject: [PATCH] only generate a new password at the first install --- campcaster/bin/postInstallStation.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/campcaster/bin/postInstallStation.sh b/campcaster/bin/postInstallStation.sh index f8e47df09..384157a00 100755 --- a/campcaster/bin/postInstallStation.sh +++ b/campcaster/bin/postInstallStation.sh @@ -416,11 +416,14 @@ $install_bin/gst-register #------------------------------------------------------------------------------- # Generate a random password for the scheduler's access to the storage #------------------------------------------------------------------------------- -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 +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 #-------------------------------------------------------------------------------