mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
Fix hooks
This commit is contained in:
parent
7934b9a5e9
commit
8159bad250
4 changed files with 22 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
app=$1
|
||||
|
||||
# Run only if we are altering aeneria's permissions
|
||||
[[ "$app" != "__APP__" ]] && exit 0
|
||||
|
||||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source /etc/yunohost/apps/$app/scripts/_common.sh
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
app=$1
|
||||
|
||||
# Run only if we are altering aeneria's permissions
|
||||
[[ "$app" != "__APP__" ]] && exit 0
|
||||
|
||||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source /etc/yunohost/apps/$app/scripts/_common.sh
|
||||
|
|
|
@ -149,6 +149,14 @@ ynh_add_config --template="../conf/aeneria.cron" --destination="/etc/cron.d/$app
|
|||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# ADAPT HOOK FOR AENERIA INSTANCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adapting hooks..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_addaccess"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_removeaccess"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -188,6 +188,14 @@ ynh_add_config --template="../conf/aeneria.cron" --destination="/etc/cron.d/$app
|
|||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# ADAPT HOOK FOR AENERIA INSTANCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adapting hooks..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_addaccess"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_removeaccess"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue