Compare commits
4 Commits
e71229e7a5
...
ce1b9e5d63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce1b9e5d63 | ||
|
|
8e4233030e | ||
|
|
94505b324c | ||
|
|
f14c8344fb |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
webhook
|
webhook
|
||||||
|
webhook.service
|
||||||
|
|
||||||
**.tar.gz
|
**.tar.gz
|
||||||
webhook-*-*/
|
webhook-*-*/
|
||||||
|
|||||||
3
fetch.sh
3
fetch.sh
@ -1,3 +0,0 @@
|
|||||||
wget https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz
|
|
||||||
tar xvf webhook-linux-amd64.tar.gz
|
|
||||||
cp webhook-linux-amd64/webhook .
|
|
||||||
12
install.sh
Executable file
12
install.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")" | sed 's/\//\\\//g')
|
||||||
|
|
||||||
|
wget -nc https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz
|
||||||
|
tar xvf webhook-linux-amd64.tar.gz
|
||||||
|
cp webhook-linux-amd64/webhook .
|
||||||
|
|
||||||
|
sed "s/RUNPATH/$scriptDir/g" webhook.service.template > webhook.service
|
||||||
|
cp webhook.service /etc/systemd/system/
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
cp webhook /usr/bin
|
||||||
|
cp * /webhook
|
||||||
6
run.sh
6
run.sh
@ -1 +1,5 @@
|
|||||||
./webhook -hooks hooks.json -verbose
|
#!/bin/bash
|
||||||
|
echo Start
|
||||||
|
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
|
||||||
|
$scriptDir/webhook -hooks $scriptDir/hooks.json -verbose
|
||||||
|
echo End Run.sh
|
||||||
|
|||||||
14
webhook.service.template
Normal file
14
webhook.service.template
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Webhook
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
RestartSec=1
|
||||||
|
User=root
|
||||||
|
ExecStart=RUNPATH/run.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
x
Reference in New Issue
Block a user