Commit 5aa1f844 authored by Matthias Larisch's avatar Matthias Larisch

Fix console scripts

parent 4146e2a7
......@@ -5,7 +5,7 @@ if [ -z "$processes" ]
then
echo "Socket NOT running! Restarting..."
cd /var/www/lmr-prod/www
php run.php mails > /var/www/lmr-prod/log/fs_mails_socket.log
php run.php Mails > /var/www/lmr-prod/log/fs_mails_socket.log
fi
exit 0
......
#!/bin/bash
cd /var/www/lmr-prod/www
FS_ENV=prod php run.php mails mailboxupdate > /var/www/lmr-prod/log/fs_mails_mailboxupdate.log
FS_ENV=prod php run.php Mails mailboxupdate > /var/www/lmr-prod/log/fs_mails_mailboxupdate.log
#!/bin/bash
cd /var/www/lmr-prod/www
php run.php mails stop > /var/www/lmr-prod/log/fs_mails_socket.log
php run.php Mails stop > /var/www/lmr-prod/log/fs_mails_socket.log
sleep 3
kill $(ps aux | grep '[p]hp run.php mails' | awk '{print $2}')
php run.php mails > /var/www/lmr-prod/log/fs_mails_socket.log
php run.php Mails > /var/www/lmr-prod/log/fs_mails_socket.log
#!/bin/bash
cd /var/www/lmr-prod/www/
FS_ENV=prod php run.php maintenance daily > /var/www/lmr-prod/log/fs_maintenance_daily.log
FS_ENV=prod php run.php Maintenance daily > /var/www/lmr-prod/log/fs_maintenance_daily.log
#!/bin/bash
cd /var/www/lmr-prod/www/
php run.php maintenance hourly > /var/www/lmr-prod/log/fs_maintenance_hourly.log
php run.php Maintenance hourly > /var/www/lmr-prod/log/fs_maintenance_hourly.log
#!/bin/bash
cd /var/www/lmr-prod/www/
php run.php maintenance membackup
service memcached restart
php run.php maintenance memrestore
#!/bin/bash
kill $(ps aux | grep '[p]hp run.php push' | awk '{print $2}')
cd /var/www/lmr-prod/www/
php run.php push
#!/bin/bash
cd /var/www/lmr-prod/www/
FS_ENV=prod php run.php stats bezirke > /var/www/lmr-prod/log/fs_stats_bezirke.log
FS_ENV=prod php run.php stats betriebe > /var/www/lmr-prod/log/fs_stats_betriebe.log
FS_ENV=prod php run.php stats foodsaver > /var/www/lmr-prod/log/fs_stats_foodsaver.log
FS_ENV=prod php run.php Stats bezirke > /var/www/lmr-prod/log/fs_stats_bezirke.log
FS_ENV=prod php run.php Stats betriebe > /var/www/lmr-prod/log/fs_stats_betriebe.log
FS_ENV=prod php run.php Stats foodsaver > /var/www/lmr-prod/log/fs_stats_foodsaver.log
......@@ -4,5 +4,5 @@ $I = new CliTester($scenario);
$I->am('Cron');
$I->wantTo('see that mailbox update method exists and starts, without caring for any errors');
$I->amInPath('');
$I->runShellCommand('php -f run.php mails mailboxupdate', false);
$I->runShellCommand('php -f run.php Mails mailboxupdate', false);
$I->seeInShellOutput('Starting mails::mailboxupdate...');
......@@ -7,10 +7,10 @@ $fsA = $I->createFoodsaver(null, array('email' => 'tollerBenutzer@ichbinneemail.
$fsB = $I->createFoodsaver(null, array('email' => 'zweiterBenutzer@gmail.com', 'last_login' => null));
$fsC = $I->createFoodsaver(null, array('email' => '2zweiterBenutzer@gmail.com', 'last_login' => (new DateTime())->format('Y-m-d H:i:s')));
$I->amInPath('');
$I->runShellCommand('php -f run.php lookup lookup tests/_data/emaillist.csv');
$I->runShellCommand('php -f run.php Lookup lookup tests/_data/emaillist.csv');
$I->seeInShellOutput($fsA['id'] . ',');
$I->seeInShellOutput($fsB['id'] . ',');
$I->runShellCommand('php -f run.php lookup deleteOldUsers tests/_data/emaillist.csv');
$I->runShellCommand('php -f run.php Lookup deleteOldUsers tests/_data/emaillist.csv');
$a = $I->grabFromDatabase('fs_foodsaver', 'deleted_at', array('id' => $fsA['id']));
$I->assertNotNull($a);
......
......@@ -4,5 +4,5 @@ $I = new CliTester($scenario);
$I->am('Cron');
$I->wantTo('see that maintenance jobs do execute');
$I->amInPath('');
$I->runShellCommand('php -f run.php maintenance daily');
$I->runShellCommand('php -f run.php Maintenance daily');
$I->seeInShellOutput('Starting maintenance::daily...');
......@@ -4,9 +4,9 @@ $I = new CliTester($scenario);
$I->am('Cron');
$I->wantTo('see that stat generation jobs do execute');
$I->amInPath('');
$I->runShellCommand('php -f run.php stats bezirke');
$I->runShellCommand('php -f run.php Stats bezirke');
$I->seeInShellOutput('Starting stats::bezirke...');
$I->runShellCommand('php -f run.php stats betriebe');
$I->runShellCommand('php -f run.php Stats betriebe');
$I->seeInShellOutput('Starting stats::betriebe...');
$I->runShellCommand('php -f run.php stats foodsaver');
$I->runShellCommand('php -f run.php Stats foodsaver');
$I->seeInShellOutput('Starting stats::foodsaver...');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment