Change fetch.sh script to install.sh

This commit is contained in:
UserA 2024-08-13 05:49:29 +03:00
parent e71229e7a5
commit f14c8344fb
2 changed files with 12 additions and 3 deletions

View File

@ -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
View 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