From 84725a3bc0588a4c5c4762b47d5b2b47f6c0199c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 2 Mar 2019 00:16:46 +0100 Subject: [PATCH] Fix hook --- scripts/upgrade | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5d2a156..72ff9c9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,7 +43,6 @@ systemctl stop "$app".service ynh_handle_app_migration gogs gogs_migrations if [[ $migration_process -eq 1 ]]; then - # Reload variables dbname=$app dbuser=$app @@ -67,6 +66,16 @@ if [[ $migration_process -eq 1 ]]; then ynh_replace_string "__APP__" "$app" ../conf/login_source.sql ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql + # Fix hooks + if [[ -e $REPO_PATH ]];then + ls $REPO_PATH/*/*.git/hooks/pre-receive | while read p; do + ynh_secure_remove $p + done + ls $REPO_PATH/*/*.git/hooks/post-receive | while read p; do + ynh_secure_remove $p + done + fi + upstream_version="0.0.1" fi