webhook
install
apt-get install webhook
touch /var/www/webhook/hook.json
systemd
注册启动系统服务
touch /etc/systemd/system/webhook.service
systemctl enable webhook
systemctl start webhook
webhook.service
[Unit]
Description=Webhook Service
After=network.target
[Service]
ExecStart=/usr/bin/webhook -hooks /var/www/webhook/hook.json -hotreload --verbose
Restart=always
RestartSec=10
User=www-data
Group=www-data
[Install]
WantedBy=multi-user.target
pm2
pm2 start webhook.sh
webhook -hooks /var/webhook/hook.yaml -verbose -hotreload -header 'Access-Control-Allow-Origin=*' -header 'Access-Control-Allow-Methods=GET,POST,OPTIONS' -header 'Access-Control-Allow-Headers=Origin,X-Requested-With,Content-Type,Accept,Authorization'