1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00
This commit is contained in:
Éric Gaspar 2024-08-11 09:16:54 +02:00
parent 5796a52e5e
commit 2593778a5a
6 changed files with 24 additions and 44 deletions

View file

@ -16,7 +16,7 @@ admindoc = "https://wiki.z-hub.io/display/ZP/Documentation"
code = "https://github.com/Z-Hub/Z-Push"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.20"
architectures = "all"
multi_instance = true
@ -47,21 +47,18 @@ ram.runtime = "50M"
[resources.permissions]
main.url = "/"
main.allowed = "visitors" # should it always be public ?
# FIXME: watdo with this ...
#REMOVEME? ynh_permission_create --permission="autodiscover" --url="re:$domain_regex/[Aa]uto[Dd]iscover/.*" --allowed="visitors" --show_tile="false" --protected="true"
main.allowed = "visitors"
[resources.apt]
packages = [
"php7.4-soap",
"php7.4-imap",
"php7.4-xsl",
"php7.4-curl",
"php7.4-xml",
"php7.4-ldap",
"php7.4-cli",
"php7.4-mbstring",
"php7.4-memcached",
"php8.3-soap",
"php8.3-imap",
"php8.3-xsl",
"php8.3-curl",
"php8.3-xml",
"php8.3-ldap",
"php8.3-cli",
"php8.3-mbstring",
"php8.3-memcached",
"libawl-php",
]

View file

@ -28,23 +28,13 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers
path="/Microsoft-Server-ActiveSync"
timezone="$(cat /etc/timezone)"
log_dir="/var/log/$app/"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -42,10 +41,10 @@ ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
mkdir -p $log_dir
chmod 750 "$log_dir"
chmod -R o-rwx "$log_dir"
chown -R $app:www-data "$log_dir"
mkdir -p "/var/log/$app/"
chmod 750 "/var/log/$app/"
chmod -R o-rwx "/var/log/$app/"
chown -R $app:www-data "/var/log/$app/"
ynh_use_logrotate
@ -119,7 +118,6 @@ ynh_add_config --template="backend/config-searchldap.php" --destination="$instal
#Copy XMLElement.php
ln -s /usr/share/awl/inc/XML* /var/www/$app/include/
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -25,8 +25,6 @@ ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
ynh_secure_remove --file="$log_dir"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -10,8 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
log_dir="/var/log/$app/"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -42,10 +40,10 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
mkdir -p $log_dir
chmod 750 "$log_dir"
chmod -R o-rwx "$log_dir"
chown -R $app:www-data "$log_dir"
mkdir -p "/var/log/$app/"
chmod 750 "/var/log/$app/"
chmod -R o-rwx "/var/log/$app/"
chown -R $app:www-data "/var/log/$app/"
#=================================================
# GENERIC FINALIZATION

View file

@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
timezone="$(cat /etc/timezone)"
log_dir="/var/log/$app/"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -67,10 +66,10 @@ ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
mkdir -p $log_dir
chmod 750 "$log_dir"
chmod -R o-rwx "$log_dir"
chown -R $app:www-data "$log_dir"
mkdir -p "/var/log/$app/"
chmod 750 "/var/log/$app/"
chmod -R o-rwx "/var/log/$app/"
chown -R $app:www-data "/var/log/$app/"
ynh_use_logrotate --non-append