1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ntfy_ynh.git synced 2024-09-03 19:46:27 +02:00

not again

This commit is contained in:
Alexander Wühr 2023-02-24 14:34:46 +01:00
parent a7fbfd20aa
commit 4a5a553c8c
No known key found for this signature in database
7 changed files with 10 additions and 17 deletions

View file

@ -8,20 +8,13 @@
# PERSONAL HELPERS
#=================================================
ntfy_setup_source() {
# $YNH_ARCH=$1
# $install_dir=$2
ynh_setup_source -d "$install_dir" -a "$YNH_ARCH"
ynh_secure_remove --file=$install_dir/client
ynh_secure_remove --file=$install_dir/server
ynh_secure_remove -f "$install_dir/client"
ynh_secure_remove -f "$install_dir/server"
mkdir -p "$install_dir/data"
}
ntfy_fix_permissions() {
# $app=$1
# $install_dir=$2
chmod o+w "$install_dir/data"
chmod 400 "$install_dir/server.yml"
chown $app:$app "$install_dir/server.yml"

View file

@ -1,7 +1,7 @@
#!/bin/bash
source /usr/share/yunohost/helpers
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
ynh_backup -s "$install_dir"
ynh_backup -s "/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -1,7 +1,7 @@
#!/bin/bash
source /usr/share/yunohost/helpers
source _common.sh
source /usr/share/yunohost/helpers
ynh_script_progression -m "Updating systemd service..." -w 1
ynh_add_systemd_config

View file

@ -1,10 +1,10 @@
#!/bin/bash
source /usr/share/yunohost/helpers
source _common.sh
source /usr/share/yunohost/helpers
ynh_script_progression -m "Setting up source files..." -w 6
ntfy_setup_src $YNH_ARCH $install_dir
ntfy_setup_src
ynh_script_progression -m "Configuring web server..." -w 2
ynh_add_nginx_config
@ -16,7 +16,7 @@ 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 $install_dir $app
ntfy_fix_permissions
ynh_script_progression -m "Configuring systemd service..." -w 1
ynh_add_systemd_config

View file

@ -1,7 +1,7 @@
#!/bin/bash
source /usr/share/yunohost/helpers
source _common.sh
source /usr/share/yunohost/helpers
ynh_script_progression -m "Removing service in YunoHost..." -w 1
yunohost service remove $app

View file

@ -7,7 +7,7 @@ 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 $app $install_dir
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"

View file

@ -9,7 +9,7 @@ upgrade_type=$(ynh_check_app_version_changed)
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression -m "Upgrading source files..." -w 1
ntfy_setup_source $YNH_ARCH $install_dir
ntfy_setup_source
fi
ynh_script_progression -m "Upgrading web server configuration..." -w 2