Keep FastCGI available during restarts
This commit is contained in:
@@ -4,7 +4,8 @@ set -e
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl daemon-reload >/dev/null 2>&1 || true
|
||||
if [ "$1" = "configure" ]; then
|
||||
systemctl enable uce.service >/dev/null 2>&1 || true
|
||||
systemctl enable uce.socket uce.service >/dev/null 2>&1 || true
|
||||
systemctl start uce.socket >/dev/null 2>&1 || true
|
||||
systemctl restart uce.service >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ set -e
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl disable --now uce.service >/dev/null 2>&1 || true
|
||||
systemctl disable --now uce.service uce.socket >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[Unit]
|
||||
Description=UCE FastCGI Runtime
|
||||
After=network-online.target mariadb.service memcached.service
|
||||
After=network-online.target mariadb.service memcached.service uce.socket
|
||||
Wants=network-online.target
|
||||
Requires=uce.socket
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -10,12 +11,10 @@ RuntimeDirectory=uce
|
||||
StateDirectory=uce
|
||||
CacheDirectory=uce
|
||||
ExecStartPre=/usr/bin/mkdir -p /var/cache/uce/work /var/lib/uce/uploads /var/lib/uce/sessions
|
||||
ExecStartPre=/usr/bin/rm -f /run/uce/fastcgi.sock
|
||||
ExecStart=/usr/lib/uce/bin/uce_fastcgi.linux.bin
|
||||
ExecStopPost=/usr/bin/rm -f /run/uce/fastcgi.sock
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
TimeoutStopSec=15
|
||||
TimeoutStopSec=30
|
||||
KillMode=mixed
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=UCE FastCGI socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/uce/fastcgi.sock
|
||||
FileDescriptorName=fastcgi
|
||||
SocketUser=www-data
|
||||
SocketGroup=www-data
|
||||
SocketMode=0660
|
||||
DirectoryMode=0755
|
||||
Backlog=100
|
||||
Service=uce.service
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Reference in New Issue
Block a user