mirror of
https://github.com/YunoHost-Apps/opensondage_ynh.git
synced 2024-09-03 19:46:28 +02:00
cleaning
This commit is contained in:
parent
eb64200959
commit
7ae2c3ad13
5 changed files with 10 additions and 25 deletions
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
@ -61,7 +61,7 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
main.add_url="/adminstuds.php"
|
main.additional_urls = ["/adminstuds.php"]
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mariadb-server php8.0-mbstring php8.0-intl php8.0-xml php8.0-cli"
|
packages = "mariadb-server php8.0-mbstring php8.0-intl php8.0-xml php8.0-cli"
|
||||||
|
|
|
@ -43,11 +43,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=low --footprint=low
|
ynh_add_fpm_config --usage=low --footprint=low
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
@ -75,7 +70,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
|
||||||
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cp ../img/logo.png "$install_dir/images"
|
cp ../conf/logo.png "$install_dir/images"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE LOG FILE
|
# CREATE LOG FILE
|
||||||
|
|
|
@ -25,6 +25,13 @@ chown -R $app:www-data "$install_dir"
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R $app: "$install_dir/"{tpl_c,admin/stdout.log}
|
chown -R $app: "$install_dir/"{tpl_c,admin/stdout.log}
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE MYSQL DATABASE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the MySQL database..." --weight=2
|
||||||
|
|
||||||
|
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -32,20 +39,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
|
||||||
|
|
||||||
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"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=2
|
|
||||||
|
|
||||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -44,11 +44,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=low --footprint=low
|
ynh_add_fpm_config --usage=low --footprint=low
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
@ -78,7 +73,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
|
||||||
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cp ../img/logo.png "$install_dir/images"
|
cp ../conf/logo.png "$install_dir/images"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE LOG FILE
|
# CREATE LOG FILE
|
||||||
|
|
Loading…
Add table
Reference in a new issue