summaryrefslogtreecommitdiff
path: root/haproxy.service
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 15:12:38 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 15:12:38 +0000
commitdadd34be6dbbc4fe831e576a9ab051fc46505f2f (patch)
treeee361944e7f9419e9fddad69bc990f37899d1dc6 /haproxy.service
parent62fb8c85cbfbf1eeef43637e68f3eec84f758996 (diff)
automatic import of haproxyopeneuler24.03_LTS
Diffstat (limited to 'haproxy.service')
-rw-r--r--haproxy.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/haproxy.service b/haproxy.service
new file mode 100644
index 0000000..a5524de
--- /dev/null
+++ b/haproxy.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=HAProxy Load Balancer
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/haproxy
+Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "CFGDIR=/etc/haproxy/conf.d"
+ExecStartPre=/usr/sbin/haproxy -f $CONFIG -f $CFGDIR -c -q $OPTIONS
+ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -f $CFGDIR -p $PIDFILE $OPTIONS
+ExecReload=/usr/sbin/haproxy -f $CONFIG -f $CFGDIR -c -q $OPTIONS
+ExecReload=/bin/kill -USR2 $MAINPID
+KillMode=mixed
+SuccessExitStatus=143
+Type=notify
+
+[Install]
+WantedBy=multi-user.target