From a5ec7cabac956f249bc6f5a475c09edaf3cc13b1 Mon Sep 17 00:00:00 2001 From: sebastian Date: Wed, 17 Feb 2010 22:48:57 +0000 Subject: [PATCH] #2369 twitter cron for packaged version --- campcaster/bin/postInstallStation.sh | 16 ++++++++++++++++ .../src/modules/htmlUI/var/install/install.php | 2 +- .../htmlUI/var/{html => }/ui_twitterCron.php | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) rename campcaster/src/modules/htmlUI/var/{html => }/ui_twitterCron.php (90%) diff --git a/campcaster/bin/postInstallStation.sh b/campcaster/bin/postInstallStation.sh index c72c1b29d..ee4133010 100755 --- a/campcaster/bin/postInstallStation.sh +++ b/campcaster/bin/postInstallStation.sh @@ -428,6 +428,22 @@ if [ "$storage_is_local" = "yes" ]; then fi fi +#------------------------------------------------------------------------------- +# Initialize the twitter cron +#------------------------------------------------------------------------------- +echo "Initializing twitter cron..."; + +cd $install_var_ls/htmlUI/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 - + +# We need the scheduler password here too +sed -i -e "s/change_me/${SCHEDULER_STORAGE_PASS}/" \ + $install_var_ls/htmlUI/var/html/ui_twitterCron.php + + #------------------------------------------------------------------------------- # Update the database, if necessary diff --git a/campcaster/src/modules/htmlUI/var/install/install.php b/campcaster/src/modules/htmlUI/var/install/install.php index 63ba403e5..295bb46f0 100644 --- a/campcaster/src/modules/htmlUI/var/install/install.php +++ b/campcaster/src/modules/htmlUI/var/install/install.php @@ -20,7 +20,7 @@ $h ='*'; $dom = '*'; $mon = '*'; $dow = '*'; -$command = '/usr/bin/php '.realpath(dirname(__FILE__).'/../html/ui_twitterCron.php').' >/dev/null 2>&1'; +$command = '/usr/bin/php '.realpath(dirname(__FILE__).'/../ui_twitterCron.php').' >/dev/null 2>&1'; $old_regex = '/ui_twitterCron\.php/'; $cron = new Cron(); diff --git a/campcaster/src/modules/htmlUI/var/html/ui_twitterCron.php b/campcaster/src/modules/htmlUI/var/ui_twitterCron.php similarity index 90% rename from campcaster/src/modules/htmlUI/var/html/ui_twitterCron.php rename to campcaster/src/modules/htmlUI/var/ui_twitterCron.php index aebccb619..222291889 100644 --- a/campcaster/src/modules/htmlUI/var/html/ui_twitterCron.php +++ b/campcaster/src/modules/htmlUI/var/ui_twitterCron.php @@ -1,6 +1,6 @@ init();