1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/filebrowser_ynh.git synced 2024-09-03 18:36:05 +02:00
This commit is contained in:
Éric Gaspar 2024-02-25 11:24:03 +01:00
parent b5bfc2237a
commit 8f274ffb67
5 changed files with 4 additions and 21 deletions

View file

@ -31,7 +31,7 @@ ynh_change_url_nginx_config
ynh_script_progression --message="Adding a configuration file..." --weight=1
path="$new_path"
ynh_add_config --template="../conf/settings.json" --destination="$install_dir/settings.json"
ynh_add_config --template="settings.json" --destination="$install_dir/settings.json"
chmod 600 "$install_dir/settings.json"
chown $app:$app "$install_dir/settings.json"

View file

@ -41,7 +41,7 @@ yunohost service add $app --description="Web File Browser" --log="/var/log/$app/
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/settings.json" --destination="$install_dir/settings.json"
ynh_add_config --template="settings.json" --destination="$install_dir/settings.json"
chmod 600 "$install_dir/settings.json"
chown $app:$app "$install_dir/settings.json"

View file

@ -9,7 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
@ -24,10 +23,8 @@ then
yunohost service remove $app
fi
# Remove the dedicated systemd config
ynh_remove_systemd_config
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================

View file

@ -6,7 +6,6 @@
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers

View file

@ -9,12 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -27,14 +21,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=4
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="settings.json"
fi
ynh_setup_source --dest_dir="$install_dir" --keep="settings.json"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -45,10 +34,8 @@ chmod -R +x "$install_dir/filebrowser"
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Web File Browser" --log="/var/log/$app/$app.log"