From ee49730da2e03443041fe8dccb8e22bd6f1d70cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20W=C3=BChr?= Date: Mon, 20 Feb 2023 13:33:39 +0100 Subject: [PATCH] Add a basic wrapper script for admin --- README.md | 2 +- README_fr.md | 2 +- check_process | 1 + conf/ntfy.sh | 3 +++ manifest.json | 2 +- scripts/install | 8 ++++++++ scripts/upgrade | 8 ++++++++ 7 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 conf/ntfy.sh diff --git a/README.md b/README.md index 2f0abcb..e805034 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ntfy (pronounce: *notify*) is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, entirely without signup, cost or setup. It's also open source if you want to run your own. -**Shipped version:** 2.0.0~ynh1 +**Shipped version:** 2.0.0~ynh2 **Demo:** https://ntfy.sh/app ## Disclaimers / important information diff --git a/README_fr.md b/README_fr.md index 64dcde9..2194474 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ntfy (pronounce: *notify*) is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, entirely without signup, cost or setup. It's also open source if you want to run your own. -**Version incluse :** 2.0.0~ynh1 +**Version incluse :** 2.0.0~ynh2 **Démo :** https://ntfy.sh/app ## Avertissements / informations importantes diff --git a/check_process b/check_process index b8246de..89c34e9 100644 --- a/check_process +++ b/check_process @@ -6,6 +6,7 @@ setup_nourl=0 setup_private=0 upgrade=1 + upgrade=1 from_commit=2.0.0-ynh1 upgrade=1 from_commit=1.31.0-ynh1 # 1.30.1~ynh1 upgrade=1 from_commit=6d7d7082971be2626d082a117cdd613a21716f61 diff --git a/conf/ntfy.sh b/conf/ntfy.sh new file mode 100644 index 0000000..835ff70 --- /dev/null +++ b/conf/ntfy.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo -u __APP__ NTFY_CONFIG_FILE="__FINALPATH__/server.yml" __FINALPATH__/ntfy $@ diff --git a/manifest.json b/manifest.json index 73ab09d..602e679 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "code": "https://github.com/binwiederhier/ntfy" }, "url": "https://ntfy.sh/", - "version": "2.0.0~ynh1", + "version": "2.0.0~ynh2", "license": "GPL-2.0-only", "maintainer": { "name": "Alexander Wühr", diff --git a/scripts/install b/scripts/install index 032e7ef..f716e63 100755 --- a/scripts/install +++ b/scripts/install @@ -104,6 +104,14 @@ ynh_add_config --template="server.yml" --destination="$final_path/server.yml" chmod 400 "$final_path/server.yml" chown $app:$app "$final_path/server.yml" +#================================================= +# ADD A SIMPLE WRAPPER SCRIPT +#================================================= +ynh_script_progression --message="Adding a command wrapper..." --weight=1 + +ynh_add_config --template="ntfy.sh" --destination="$final_path/ntfy.sh" +chmod +x "$final_path/ntfy.sh" + #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2ef09dd..d6cd389 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,6 +103,14 @@ ynh_add_config --template="server.yml" --destination="$final_path/server.yml" chmod 400 "$final_path/server.yml" chown $app:$app "$final_path/server.yml" +#================================================= +# UPDATE A SIMPLE WRAPPER SCRIPT +#================================================= +ynh_script_progression --message="Updating a command wrapper..." --weight=1 + +ynh_add_config --template="ntfy.sh" --destination="$final_path/ntfy.sh" +chmod +x "$final_path/ntfy.sh" + #================================================= # SETUP SYSTEMD #=================================================