Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Add ntfy egg #2582

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ If you are reading this it looks like you are looking to add an egg to your serv

* [Meilisearch](/software/meilisearch)

### Ntfy

* [ntfy](/software/ntfy)

### Owncast

* [owncast](/software/owncast)
Expand Down
7 changes: 7 additions & 0 deletions software/ntfy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# [NTFY](https://ntfy.sh/)

A simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API.

## Server Ports

One port needs to be allocated to run ntfy.
42 changes: 42 additions & 0 deletions software/ntfy/egg-ntfy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2023-12-08T18:01:30+01:00",
"name": "ntfy",
"author": "[email protected]",
"description": "Send push notifications to your phone or desktop using PUT\/POST",
"features": null,
"docker_images": {
"Debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/ntfy serve --config server\/server.yml",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"INFO Listening on\"\r\n}",
"logs": "{}",
ThnksCJ marked this conversation as resolved.
Show resolved Hide resolved
"stop": "^C"
},
"scripts": {
"installation": {
"script": "## NTFY Installscript\r\n\r\n\r\n## Variables\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\")\r\nMATCH=linux_${ARCH}.tar.gz\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/binwiederhier\/ntfy\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/binwiederhier\/ntfy\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n## install ntfy\r\necho -e \"Download url: ${DOWNLOAD_URL}\"\r\necho -e \"Downloading ntfy: ${VERSION}\"\r\ncurl -sSL -o ntfy_linux.tar.gz ${DOWNLOAD_URL}\r\n\r\necho -e \"unzipping ntfy exc\"\r\ntar xvf ntfy_linux.tar.gz --strip-components=1\r\n\r\n## clear temp stuff\r\necho -e \"deleting temp files\"\r\nrm ntfy_linux.tar.gz\r\n\r\nchmod +x ntfy\r\n\r\nFILE=\/mnt\/server\/cache.db\r\nif [ -f \"$FILE\" ]; then\r\n echo \"$FILE exists.\"\r\n echo -e \"skipping creating cache.db\"\r\nelse \r\n echo -e \"creating cache.db\"\r\n touch cache.db\r\nfi\r\n\r\nrm -f \/mnt\/server\/server\/server.yml\r\n\r\necho -e '# ntfy server config file\r\n#\r\n# Please refer to the documentation at https:\/\/ntfy.sh\/docs\/config\/ for details.\r\n# All options also support underscores (_) instead of dashes (-) to comply with the YAML spec.\r\n\r\nlisten-http: \":'${SERVER_PORT}'\"\r\ncache-file: \".\/cache.db\"' >> \/mnt\/server\/server\/server.yml\r\n\r\n\r\necho -e \"-------------------------------------------------\"\r\necho -e \"Installation completed\"\r\necho -e \"-------------------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Version",
"description": "Version for (re)installation such as 2.8.0. Defaults to latest version if no valid version is provided",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "string|max:20",
"field_type": "text"
}
]
}