From 7168a5d7600de4b831ff06844396e85506960374 Mon Sep 17 00:00:00 2001 From: akulij Date: Tue, 13 Aug 2024 05:49:29 +0300 Subject: [PATCH] Change fetch.sh script to install.sh --- fetch.sh | 3 --- install.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) delete mode 100755 fetch.sh create mode 100755 install.sh diff --git a/fetch.sh b/fetch.sh deleted file mode 100755 index ca18167..0000000 --- a/fetch.sh +++ /dev/null @@ -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 . diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..0ff57da --- /dev/null +++ b/install.sh @@ -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