mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Fix cron and maintenance jobs
This commit is contained in:
parent
95ceb5c8a2
commit
4e12728808
4 changed files with 4 additions and 2 deletions
|
@ -1 +1 @@
|
|||
*/15 * * * * __USER__ /usr/bin/php -f __DESTDIR__/cron.php
|
||||
*/15 * * * * __USER__ /usr/bin/php__YNH_PHP_VERSION__ -f __DESTDIR__/cron.php
|
||||
|
|
|
@ -268,6 +268,7 @@ chmod 644 "$cron_path"
|
|||
|
||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$cron_path"
|
||||
ynh_replace_string --match_string="__DESTDIR__" --replace_string="$final_path" --target_file="$cron_path"
|
||||
ynh_replace_string --match_string="__YNH_PHP_VERSION__" --replace_string="$YNH_PHP_VERSION" --target_file="$cron_path"
|
||||
|
||||
exec_occ background:cron
|
||||
|
||||
|
|
|
@ -383,6 +383,7 @@ chmod 644 "$cron_path"
|
|||
|
||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$cron_path"
|
||||
ynh_replace_string --match_string="__DESTDIR__" --replace_string="$final_path" --target_file="$cron_path"
|
||||
ynh_replace_string --match_string="__YNH_PHP_VERSION__" --replace_string="$YNH_PHP_VERSION" --target_file="$cron_path"
|
||||
|
||||
exec_occ background:cron
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@ last_upgrade_operations () {
|
|||
cp -a ../sources/patches_last_version/* ../sources/patches
|
||||
|
||||
# Execute post-upgrade operations later on
|
||||
(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php occ db:add-missing-indices ; sudo -u $app php occ db:convert-filecache-bigint -n) > /tmp/${app}_maintenance.log")
|
||||
(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php${YNH_PHP_VERSION} occ db:add-missing-indices ; sudo -u $app php${YNH_PHP_VERSION} occ db:convert-filecache-bigint -n) > /tmp/${app}_maintenance.log")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue