Created
March 5, 2023 18:04
-
-
Save manueldev/99957a05795da1be94399302673bc958 to your computer and use it in GitHub Desktop.
Installing webhook in sysd systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "[-] Installing webhook in sysd.." | |
file_location=/etc/systemd/system/webhook.service | |
cat > $file_location <<EOF | |
[Unit] | |
Description=webhook server for ci | |
ConditionPathExists=/bin/webhook | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/root/monitoreo-ok/webhook | |
ExecStart=/bin/webhook -hooks hooks.json -port 10000 -verbose | |
Restart=on-failure | |
PrivateTmp=true | |
[Install] | |
WantedBy=default.target | |
EOF | |
systemctl daemon-reload | |
systemctl start webhook.service | |
systemctl enable webhook.service | |
echo "[ok] Installing webhook in sysd." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment