Stage ABI-scoped unit generations
This commit is contained in:
@@ -56,6 +56,15 @@ case "$action" in
|
||||
if [[ "$REPO_ROOT" != "/usr/lib/uce" && "$REPO_ROOT" != "/opt/uce" ]]; then
|
||||
"$REPO_ROOT/scripts/build_linux.sh"
|
||||
fi
|
||||
(
|
||||
cd "$REPO_ROOT"
|
||||
service_user=$(systemctl show "$UNIT_NAME" -p User --value)
|
||||
if [[ -n "$service_user" && "$(id -u)" == "0" ]]; then
|
||||
runuser -u "$service_user" -- "$REPO_ROOT/bin/uce_fastcgi.linux.bin" --precompile
|
||||
else
|
||||
"$REPO_ROOT/bin/uce_fastcgi.linux.bin" --precompile
|
||||
fi
|
||||
)
|
||||
systemctl restart "$UNIT_NAME"
|
||||
;;
|
||||
start|stop|status)
|
||||
|
||||
@@ -10,7 +10,7 @@ if [[ -r /etc/uce/settings.cfg ]]; then
|
||||
fi
|
||||
|
||||
for ((attempt = 0; attempt < 200; attempt++)); do
|
||||
if [[ -S "$socket_path" ]]; then
|
||||
if [[ -S "$socket_path" ]] && [[ "$(curl -sS --max-time 0.2 --unix-socket "$socket_path" http://localhost/ping 2>/dev/null || true)" == "uce-cli: ok" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 0.05
|
||||
|
||||
Reference in New Issue
Block a user