Initial LisgloSIPS V2 implementation

This commit is contained in:
hectorzhao
2026-06-22 10:56:38 +08:00
commit 5fa1bd35e9
303 changed files with 35644 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
set -euo pipefail
if [ "$#" -ne 1 ]; then
echo "usage: $0 /opt/lisglosips/releases/<release-id>" >&2
exit 64
fi
target="$1"
case "$target" in
/opt/lisglosips/releases/*) ;;
*)
echo "target must be under /opt/lisglosips/releases" >&2
exit 64
;;
esac
target="$(readlink -f "$target")"
test -d "$target"
test -f "$target/package.json"
previous="$(readlink -f /opt/lisglosips/current)"
echo "previous=$previous"
echo "target=$target"
ln -sfn "$target" /opt/lisglosips/current
systemctl restart lisglosips@api lisglosips@cdr-worker lisglosips@recording-worker
nginx -t
systemctl reload nginx
curl --max-time 10 --fail --silent http://127.0.0.1:3000/api/v2/health/ready
echo
echo "rollback ok"