1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glpi_ynh.git synced 2024-09-03 20:36:21 +02:00
This commit is contained in:
Éric Gaspar 2023-09-26 10:29:33 +02:00
parent 1b66be2260
commit 34a786ab1e
5 changed files with 14 additions and 24 deletions

View file

@ -22,7 +22,7 @@ multi_instance = true
ldap = false ldap = false
sso = false sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "200M"
ram.runtime = "50M" ram.runtime = "50M"
[install] [install]
@ -51,7 +51,7 @@ ram.runtime = "50M"
main.url = "/" main.url = "/"
[resources.apt] [resources.apt]
packages = "mariadb-server, php8.0-cli,php8.0-curl, php8.0-fileinfo, php8.0-gd, php8.0-mbstring, php8.0-mysqli, php8.0-simplexml, php8.0-xml, php8.0-intl, php8.0-ldap, php8.0-xmlrpc, php8.0-bz2, php8.0-zip" packages = "mariadb-server, php8.2-cli,php8.2-curl, php8.2-fileinfo, php8.2-gd, php8.2-mbstring, php8.2-mysqli, php8.2-simplexml, php8.2-xml, php8.2-intl, php8.2-ldap, php8.2-xmlrpc, php8.2-bz2, php8.2-zip"
[resources.database] [resources.database]
type = "mysql" type = "mysql"

View file

@ -21,9 +21,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
@ -31,6 +31,8 @@ ynh_add_fpm_config
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
@ -43,13 +45,6 @@ pushd $install_dir
php$phpversion bin/console glpi:config:set url_base https://$domain$path php$phpversion bin/console glpi:config:set url_base https://$domain$path
popd popd
#=================================================
# CONFIGURE CRON
#=================================================
ynh_script_progression --message="Configuring a cron file..." --weight=1
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -10,9 +10,9 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config

View file

@ -30,7 +30,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"

View file

@ -31,9 +31,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
@ -41,6 +41,8 @@ ynh_add_fpm_config
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
#================================================= #=================================================
@ -49,16 +51,9 @@ ynh_add_nginx_config
ynh_script_progression --message="Updating the database..." --weight=1 ynh_script_progression --message="Updating the database..." --weight=1
pushd $install_dir pushd $install_dir
php$phpversion bin/console db:update --no-interaction php$phpversion bin/console db:update --no-interaction --no-telemetry
popd popd
#=================================================
# UPDATE CRON
#=================================================
ynh_script_progression --message="Updating a cron file..." --weight=1
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================