diff --git a/scripts/change_url b/scripts/change_url index cad1573..052b59d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -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" diff --git a/scripts/install b/scripts/install index 9ff16b1..572518b 100755 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/remove b/scripts/remove index 86d07ca..5db6c8a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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 #================================================= diff --git a/scripts/restore b/scripts/restore index 6c61498..de05333 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 589d3b9..38f5187 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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"