Skip to content

Instantly share code, notes, and snippets.

@manueldev
Created March 5, 2023 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manueldev/99957a05795da1be94399302673bc958 to your computer and use it in GitHub Desktop.
Save manueldev/99957a05795da1be94399302673bc958 to your computer and use it in GitHub Desktop.
Installing webhook in sysd systemd
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