diff --git a/README.md b/README.md index 2f0abcb..4ab122c 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.1~ynh1 **Demo:** https://ntfy.sh/app ## Disclaimers / important information diff --git a/README_fr.md b/README_fr.md index 64dcde9..e7c36f8 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.1~ynh1 **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/amd64.src b/conf/amd64.src index ec038e5..533f71e 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.0/ntfy_2.0.0_linux_x86_64.tar.gz -SOURCE_SUM=3603e08929fc5e7980f7e0d198e5f5545d23957bb60c8daf6ab9bc0165549285 +SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.1/ntfy_2.0.1_linux_x86_64.tar.gz +SOURCE_SUM=e3da79a6772e3561e7cc6927f918dbfc3a985f56bc53688ec1a4ca0dfe164fff SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.0.0_linux_x86_64 +SOURCE_FILENAME=ntfy_2.0.1_linux_x86_64 diff --git a/conf/arm64.src b/conf/arm64.src index 338e170..f17db68 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.0/ntfy_2.0.0_linux_arm64.tar.gz -SOURCE_SUM=fb5f6df4da0d4e625fa15ef1a006e63912cdcd65c3c2bbc78018bf9ea9964498 +SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.1/ntfy_2.0.1_linux_arm64.tar.gz +SOURCE_SUM=af00579d814537b848a424b20361e948a3ef6a014b831c20ce374b6c71d6b4f6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.0.0_linux_arm64 +SOURCE_FILENAME=ntfy_2.0.1_linux_arm64 diff --git a/conf/armhf.src b/conf/armhf.src index 1628e47..c684601 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.0/ntfy_2.0.0_linux_armv7.tar.gz -SOURCE_SUM=5a864d8fcc0f9faad5989463558bcee3b70b8c6ec15f0a95c348d864d8b3cf68 +SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.0.1/ntfy_2.0.1_linux_armv7.tar.gz +SOURCE_SUM=2f6c8a8ca99593d41e75ca35cbc78673647d76c5e20c08c6d7fb3d535c77e50f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.0.0_linux_armv7 +SOURCE_FILENAME=ntfy_2.0.1_linux_armv7 diff --git a/conf/ntfy.sh b/conf/ntfy.sh new file mode 100644 index 0000000..585d5df --- /dev/null +++ b/conf/ntfy.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +HOME=__FINALPATH__ + +NTFY_CONFIG_FILE="$HOME/server.yml" $HOME/ntfy $@ diff --git a/conf/server.yml b/conf/server.yml index c283fc3..45a0012 100644 --- a/conf/server.yml +++ b/conf/server.yml @@ -13,6 +13,7 @@ cache-startup-queries: | auth-file: __FINALPATH__/data/user.db auth-default-access: "deny-all" +enable-login: true attachment-cache-dir: __FINALPATH__/data/attachments diff --git a/manifest.json b/manifest.json index 73ab09d..166a63b 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.1~ynh1", "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 #================================================= diff --git a/tools/update_src.sh b/tools/update_src.sh new file mode 100644 index 0000000..dad7c1b --- /dev/null +++ b/tools/update_src.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +VERSION=$1 + +CHECKSUMS=`wget https://github.com/binwiederhier/ntfy/releases/download/v$VERSION/checksums.txt -q -O -` + +src() { + cat << SH > conf/$1.src +SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v${VERSION}/ntfy_${VERSION}_linux_${2}.tar.gz +SOURCE_SUM=`echo "$CHECKSUMS" | grep ${VERSION}_linux_${2}.tar.gz | cut -d " " -f 1` +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME=ntfy_${VERSION}_linux_${2} +SH +} + +src amd64 x86_64 +src arm64 arm64 +src armhf armv7