remove unneccessary lines
This commit is contained in:
@@ -4,5 +4,6 @@ Description=Send Gitea failure notification for %i
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/local/bin/notify-gitea.sh %i failure
|
ExecStart=/usr/local/bin/notify-gitea.sh %i failure
|
||||||
# Load webhook URL from environment file
|
# Load webhook URL: system-wide config first, user config overrides if present
|
||||||
EnvironmentFile=-/etc/notify-gitea.conf
|
EnvironmentFile=-/etc/notify-gitea.conf
|
||||||
|
EnvironmentFile=-%h/.config/notify-gitea.env
|
||||||
|
|||||||
@@ -19,10 +19,13 @@ STATUS="${2:-unknown}"
|
|||||||
HOSTNAME=$(hostname)
|
HOSTNAME=$(hostname)
|
||||||
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S %Z')
|
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S %Z')
|
||||||
|
|
||||||
# Load config from file if not set
|
# Load config from file if not set (system-wide, then user override)
|
||||||
if [[ -f /etc/notify-gitea.conf ]]; then
|
if [[ -f /etc/notify-gitea.conf ]]; then
|
||||||
source /etc/notify-gitea.conf
|
source /etc/notify-gitea.conf
|
||||||
fi
|
fi
|
||||||
|
if [[ -f "${HOME}/.config/notify-gitea.env" ]]; then
|
||||||
|
source "${HOME}/.config/notify-gitea.env"
|
||||||
|
fi
|
||||||
|
|
||||||
# Validate required variables
|
# Validate required variables
|
||||||
for var in GITEA_URL GITEA_TOKEN GITEA_OWNER GITEA_REPO; do
|
for var in GITEA_URL GITEA_TOKEN GITEA_OWNER GITEA_REPO; do
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Run get_saint_of_the_day.py (profile stats updater)
|
Description=Run get_saint_of_the_day.py (profile stats updater)
|
||||||
OnFailure=notify-gitea-failure@%n.service
|
OnFailure=notify-gitea-failure@%n.service
|
||||||
StartLimitBurst=5
|
|
||||||
StartLimitIntervalSec=43200
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|||||||
Reference in New Issue
Block a user