Run postactiv scripts without complaints

This commit is contained in:
Bob Mottram 2017-02-18 11:27:37 +00:00
parent 4871fd282b
commit 3bbec8cf91
1 changed files with 7 additions and 4 deletions

View File

@ -186,10 +186,13 @@ function postactiv_running_script {
echo 'fi' >> /etc/cron.hourly/postactiv-daemons
echo "cd /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs" >> /etc/cron.hourly/postactiv-daemons
echo 'php scripts/delete_orphan_files.php' >> /etc/cron.hourly/postactiv-daemons
echo 'php scripts/clean_thumbnails.php -y' >> /etc/cron.hourly/postactiv-daemons
echo '# php scripts/cleanup_file_table.php' >> /etc/cron.hourly/postactiv-daemons
echo '# php scripts/upgrade.php' >> /etc/cron.hourly/postactiv-daemons
echo "if ! grep -q \"//define('POSTACTIV',true);\" scripts/commandline.inc; then" >> /etc/cron.hourly/postactiv-daemons
echo " sed -i \"s|define('POSTACTIV',true);|//define('POSTACTIV',true);|g\" scripts/commandline.inc" >> /etc/cron.hourly/postactiv-daemons
echo 'fi' >> /etc/cron.hourly/postactiv-daemons
echo 'php scripts/delete_orphan_files.php > /dev/null' >> /etc/cron.hourly/postactiv-daemons
echo 'php scripts/clean_thumbnails.php -y > /dev/null' >> /etc/cron.hourly/postactiv-daemons
echo '# php scripts/cleanup_file_table.php > /dev/null' >> /etc/cron.hourly/postactiv-daemons
echo '# php scripts/upgrade.php > /dev/null' >> /etc/cron.hourly/postactiv-daemons
chmod +x /etc/cron.hourly/postactiv-daemons
}