1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adminer_ynh.git synced 2024-09-03 18:06:06 +02:00
adminer_ynh/scripts/install

59 lines
1.8 KiB
Text
Raw Normal View History

2014-05-08 19:46:08 +02:00
#!/bin/bash
2018-06-27 17:21:59 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2014-05-08 19:46:08 +02:00
2018-06-27 17:21:59 +02:00
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
2020-10-12 20:47:58 +02:00
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
2020-04-26 00:47:07 +02:00
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
2018-06-27 17:21:59 +02:00
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
2020-04-26 00:47:07 +02:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2020-10-12 20:47:58 +02:00
ynh_script_progression --message="Setting up source files..." --weight=11
2020-04-26 00:47:07 +02:00
# Download, check integrity, uncompress and patch the source from app.src
mkdir -p $install_dir
2018-06-27 17:21:59 +02:00
#copy files from with_root_access folder to the install_dir
cp -a ../sources/with_root_access/. $install_dir
2014-07-22 16:08:09 +02:00
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2018-06-27 17:21:59 +02:00
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
2020-10-12 20:47:58 +02:00
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
2018-06-27 17:21:59 +02:00
# Create a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
# Create a dedicated nginx config
ynh_add_nginx_config
2018-06-27 17:21:59 +02:00
2020-10-12 20:47:58 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-11-20 22:30:25 +01:00
ynh_script_progression --message="Installation of $app completed" --last