From 4f2444c884a383296f156a47362da76b79a78304 Mon Sep 17 00:00:00 2001 From: dragondaddy Date: Sun, 12 Nov 2023 23:13:17 +0100 Subject: [PATCH] Upgrade script, again --- scripts/upgrade | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 63e5742..78e8f87 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,6 +83,18 @@ then chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod -R 775 $install_dir/store $install_dir/cache + + #================================================= + # ADDONS + #================================================= + ynh_script_progression --message="Installing addons..." + + pushd $install_dir + ynh_exec_as $app git config pull.rebase false + ynh_exec_as $app util/add_addon_repo https://codeberg.org/streams/streams-addons.git zaddons + cd /var/www/$app/extend/addon/zaddons + ynh_exec_as $app git config pull.rebase false + popd fi fi @@ -119,12 +131,15 @@ chown $app:$app "$install_dir/.htconfig.php" #================================================= # UPGRADE CRON JOB #================================================= -ynh_script_progression --message="Upgrading cron job..." --weight=1 +ynh_script_progression --message="Setuping cron job..." --weight=1 # Set up cron job -ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app" +ynh_add_config --template="../conf/cronjobs" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" +# Add daily update script +ynh_add_config --template="../conf/daily-update.sh" --destination="/home/yunohost.app/$app/daily-update.sh" +chown root: "/home/yunohost.app/$app/daily-update.sh" #================================================= # GENERIC FINALIZATION