diff --git a/scripts/_common.sh b/scripts/_common.sh index 1a0d641..63e11c5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,13 +11,9 @@ ntfy_setup_source() { ynh_setup_source -d "$install_dir" -s "$YNH_ARCH" ynh_secure_remove "$install_dir/client" ynh_secure_remove "$install_dir/server" + mkdir -p "$install_dir/data" -} - -ntfy_fix_permissions() { - chown -R $app:$app "$install_dir" - chmod -R 750 "$install_dir" - chmod +x "$install_dir/ntfy.sh" + chmod -R 750 "$install_dir/data" } #================================================= diff --git a/scripts/install b/scripts/install index 6d2629a..3a1fca1 100755 --- a/scripts/install +++ b/scripts/install @@ -15,9 +15,6 @@ ynh_add_config -t "server.yml" -d "$install_dir/server.yml" ynh_script_progression -m "Adding a command wrapper..." -w 1 ynh_add_config -t "ntfy.sh" -d "$install_dir/ntfy.sh" -ynh_script_progression -m "Fixing file permissions..." -w 1 -ntfy_fix_permissions - ynh_script_progression -m "Configuring systemd service..." -w 1 ynh_add_systemd_config diff --git a/scripts/restore b/scripts/restore index 5962cc2..ba5daaa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,9 +6,6 @@ source /usr/share/yunohost/helpers ynh_script_progression -m "Restoring the main directory..." -w 1 ynh_restore_file -o "$install_dir" -ynh_script_progression -m "Fixing file permissions..." -w 1 -ntfy_fix_permissions - ynh_script_progression -m "Restoring the web server configuration..." -w 1 ynh_restore_file -o "/etc/nginx/conf.d/$domain.d/$app.conf" @@ -20,7 +17,6 @@ ynh_script_progression -m "Integrating service in YunoHost..." -w 1 yunohost service add $app ynh_script_progression -m "Starting a systemd service..." -w 1 - ynh_systemd_action -a start ynh_script_progression -m "Reloading the web server..." -w 1