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

Add a basic wrapper script for admin

This commit is contained in:
Alexander Wühr 2023-02-20 13:33:39 +01:00
parent 0600b882d0
commit ee49730da2
No known key found for this signature in database
7 changed files with 23 additions and 3 deletions

View file

@ -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. 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 **Demo:** https://ntfy.sh/app
## Disclaimers / important information ## Disclaimers / important information

View file

@ -19,7 +19,7 @@ Si vous navez 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. 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 **Démo :** https://ntfy.sh/app
## Avertissements / informations importantes ## Avertissements / informations importantes

View file

@ -6,6 +6,7 @@
setup_nourl=0 setup_nourl=0
setup_private=0 setup_private=0
upgrade=1 upgrade=1
upgrade=1 from_commit=2.0.0-ynh1
upgrade=1 from_commit=1.31.0-ynh1 upgrade=1 from_commit=1.31.0-ynh1
# 1.30.1~ynh1 # 1.30.1~ynh1
upgrade=1 from_commit=6d7d7082971be2626d082a117cdd613a21716f61 upgrade=1 from_commit=6d7d7082971be2626d082a117cdd613a21716f61

3
conf/ntfy.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
sudo -u __APP__ NTFY_CONFIG_FILE="__FINALPATH__/server.yml" __FINALPATH__/ntfy $@

View file

@ -15,7 +15,7 @@
"code": "https://github.com/binwiederhier/ntfy" "code": "https://github.com/binwiederhier/ntfy"
}, },
"url": "https://ntfy.sh/", "url": "https://ntfy.sh/",
"version": "2.0.0~ynh1", "version": "2.0.0~ynh2",
"license": "GPL-2.0-only", "license": "GPL-2.0-only",
"maintainer": { "maintainer": {
"name": "Alexander Wühr", "name": "Alexander Wühr",

View file

@ -104,6 +104,14 @@ ynh_add_config --template="server.yml" --destination="$final_path/server.yml"
chmod 400 "$final_path/server.yml" chmod 400 "$final_path/server.yml"
chown $app:$app "$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 # SETUP SYSTEMD
#================================================= #=================================================

View file

@ -103,6 +103,14 @@ ynh_add_config --template="server.yml" --destination="$final_path/server.yml"
chmod 400 "$final_path/server.yml" chmod 400 "$final_path/server.yml"
chown $app:$app "$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 # SETUP SYSTEMD
#================================================= #=================================================