mirror of
https://github.com/YunoHost-Apps/selfoss_ynh.git
synced 2024-09-03 20:16:21 +02:00
42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression "Upgrading source files..."
|
|
|
|
ynh_setup_source --dest_dir="$install_dir" --keep="data"
|
|
|
|
chmod g+w $install_dir/data/cache $install_dir/data/favicons $install_dir/data/logs $install_dir/data/thumbnails $install_dir/data/sqlite $install_dir/public
|
|
|
|
#=================================================
|
|
# PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Upgrading PHP-FPM configuration..."
|
|
|
|
ynh_config_add_phpfpm
|
|
|
|
ynh_config_add_nginx
|
|
|
|
#=================================================
|
|
# UPDATE A CONFIG FILE
|
|
#=================================================
|
|
ynh_script_progression "Updating configuration..."
|
|
|
|
ynh_config_add --template="config.ini" --destination="$install_dir/config.ini"
|
|
|
|
#=================================================
|
|
# SETUP A CRON
|
|
#=================================================
|
|
ynh_script_progression "Setuping a cron..."
|
|
|
|
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Upgrade of $app completed"
|