This commit is contained in:
Quinten 2023-12-03 13:04:27 +01:00 committed by GitHub
parent b81a99b063
commit c46afe7f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,13 +4,13 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2023-12-01T20:43:46+01:00",
"exported_at": "2023-12-03T13:03:17+01:00",
"name": "ntfy",
"author": "me@cjstevenson.com",
"description": null,
"description": "Send push notifications to your phone or desktop using PUT\/POST",
"features": null,
"docker_images": {
"ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian"
"Debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/ntfy serve --config server\/server.yml",
@ -22,8 +22,8 @@
},
"scripts": {
"installation": {
"script": "## NTFY Installscript\r\n\r\n## update system\r\napt update\r\napt -y install --no-install-recommends curl tar jq ca-certificates\r\n\r\n## Variables\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\")\r\nMATCH=linux_${ARCH}.tar.gz\r\n\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_${ARCH}.tar.gz $DOWNLOAD_URL\r\n\r\necho -e \"unzipping ntfy exc\"\r\ntar -zxvf .\/ntfy_linux_${ARCH}.tar.gz \r\n\r\nmv .\/*_linux_${ARCH}\/ntfy .\r\n\r\n## clear temp stuff\r\necho -e \"deleting temp files\"\r\nrm .\/ntfy_linux_${ARCH}.tar.gz\r\nrm -r .\/*_linux_${ARCH}\r\n\r\necho -e \"creating cache.db\"\r\ntouch cache.db\r\n\r\necho -e \"-------------------------------------------------\"\r\necho -e \"Installation completed\"\r\necho -e \"-------------------------------------------------\"",
"container": "debian:bullseye-slim",
"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\n\r\n\r\necho -e \"-------------------------------------------------\"\r\necho -e \"Installation completed\"\r\necho -e \"-------------------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},