webhook -> polling

This commit is contained in:
mercury
2026-04-23 22:18:22 +04:00
parent 9439984cd2
commit b18b002d55
4 changed files with 35 additions and 24 deletions
+3 -5
View File
@@ -1,12 +1,10 @@
rm /ssh/key*
ssh-keygen -m PEM -t rsa -f /ssh/key -N ''
openssl req -newkey rsa:2048 -sha256 -nodes -x509 -days 365 -keyout /certs/self_private -out /certs/self_public -subj "/C=NN/ST=N/L=N/O=N/CN=$IP"
php init.php
if [[ -f "/start" && -f "/ssh/key.pub" && -s "/ssh/key.pub" ]]; then
unitd --log /logs/unit_error
if [[ -f "/ssh/key.pub" && -s "/ssh/key.pub" ]]; then
unitd --control 0.0.0.0:8080 --log /logs/unit_error
curl -X PUT --data-binary @/config/unit.json --unix-socket /var/run/control.unit.sock http://localhost/config
pkill unitd
unitd --no-daemon --control 0.0.0.0:8080 --log /logs/unit_error
php init.php
else
exit 1;
fi