First version
This commit is contained in:
commit
f083bd1451
9 files changed
+211
No files matched your search
@@ -0,0 +1 @@
|
||||
/etc/notifications-webhook/config
|
||||
@@ -0,0 +1,11 @@
|
||||
Package: notifications-webhook
|
||||
Version: @VERSION@
|
||||
Architecture: all
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: python3 (>= 3.10), python3-requests, python3-shared-models (>= 1.0)
|
||||
Maintainer: Florian dev@gansejunge.com
|
||||
Description: Command-line client for the notification webhook
|
||||
Provides the send-notification command and the send_notifications_webhook
|
||||
Python library. The webhook URL and API key are read from
|
||||
/etc/notifications-webhook/config.
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! getent group notifications-webhook >/dev/null; then
|
||||
groupadd --system notifications-webhook
|
||||
fi
|
||||
chown root:notifications-webhook /etc/notifications-webhook/config
|
||||
chmod 0640 /etc/notifications-webhook/config
|
||||
|
||||
if command -v py3compile >/dev/null 2>&1; then
|
||||
py3compile -p notifications-webhook
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if command -v py3clean >/dev/null 2>&1; then
|
||||
py3clean -p notifications-webhook
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,8 @@
|
||||
# Configuration for send-notification.
|
||||
#
|
||||
# This file contains a secret. It is readable by root and members of the
|
||||
# notifications-webhook group only; add users with:
|
||||
# sudo usermod -aG notifications-webhook USERNAME
|
||||
#
|
||||
# url = https://notifier.example.com/webhook/notifications/myscript
|
||||
# api_key = your-key-here
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
import sys
|
||||
|
||||
from send_notifications_webhook.cli import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user