From 12b078d680da15ab34ea00a377773b98f426e7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 18 Mar 2018 16:41:16 +0100 Subject: [PATCH] remplace app instance name into hooks --- hooks/post_app_addaccess | 3 +-- hooks/post_user_create | 2 +- hooks/post_user_delete | 2 +- scripts/install | 5 +++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hooks/post_app_addaccess b/hooks/post_app_addaccess index 7d5d247..1bd3e0c 100755 --- a/hooks/post_app_addaccess +++ b/hooks/post_app_addaccess @@ -1,6 +1,5 @@ #!/bin/bash - -app=$YNH_APP_INSTANCE_NAME +app=APPNAMETOCHANGE new_users=$2 app_path=/var/www/$app diff --git a/hooks/post_user_create b/hooks/post_user_create index bc39483..99c8c2e 100755 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -1,5 +1,5 @@ #!/bin/bash -app=$YNH_APP_INSTANCE_NAME +app=APPNAMETOCHANGE app_path=/var/www/$app myuser=$1 diff --git a/hooks/post_user_delete b/hooks/post_user_delete index bcccdf0..9b978a5 100755 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -1,5 +1,5 @@ #!/bin/bash -app=$YNH_APP_INSTANCE_NAME +app=APPNAMETOCHANGE app_path=/var/www/$app myuser=$1 diff --git a/scripts/install b/scripts/install index c7dfc19..ea0ff87 100755 --- a/scripts/install +++ b/scripts/install @@ -72,6 +72,11 @@ sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sed -i "s@ALIASTOCHANGE@$FINAL_PATH/@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf +#update hook for multi instance +sed -i "s@APPNAMETOCHANGE@$app@g" ../hooks/post_app_addaccess +sed -i "s@APPNAMETOCHANGE@$app@g" ../hooks/post_user_create +sed -i "s@APPNAMETOCHANGE@$app@g" ../hooks/post_user_delete + #install update cron # Add cron job cron_path="/etc/cron.d/$app"