1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/privatebin_ynh.git synced 2024-09-03 20:15:56 +02:00
privatebin_ynh/scripts/install

56 lines
1.8 KiB
Text
Raw Normal View History

2013-12-24 13:37:55 +01:00
#!/bin/bash
2017-09-02 22:57:43 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2020-10-13 17:56:48 +02:00
source _common.sh
source /usr/share/yunohost/helpers
2017-09-02 22:57:43 +02:00
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
2017-09-02 22:57:43 +02:00
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
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
2017-09-02 22:57:43 +02:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2019-05-03 20:04:21 +02:00
ynh_script_progression --message="Setting up source files..." --weight=3
2017-09-02 22:57:43 +02:00
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
mkdir -p $install_dir/{data,tmp}
2022-07-29 00:49:56 +02:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2013-12-24 13:37:55 +01:00
2017-09-02 22:57:43 +02:00
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
2020-10-13 17:56:48 +02:00
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
2013-12-24 13:37:55 +01:00
2020-10-13 17:56:48 +02:00
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
2013-12-24 13:37:55 +01:00
2022-07-28 21:27:54 +02:00
# Create a dedicated NGINX config
ynh_add_nginx_config
2019-05-03 20:04:21 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2017-09-02 22:57:43 +02:00
2022-07-28 21:27:54 +02:00
ynh_script_progression --message="Installation of $app completed" --last