mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: change chroot directory
This commit is contained in:
@@ -37,7 +37,7 @@ function haproxy_syslog()
|
||||
$syslogconf = array();
|
||||
|
||||
$syslogconf['haproxy'] = array(
|
||||
'local' => '/var/run/haproxy/var/run/log',
|
||||
'local' => '/var/haproxy/var/run/log',
|
||||
'facility' => array('haproxy'),
|
||||
'remote' => 'relayd',
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
HAPROXY_DIRS="/var/run/haproxy /var/etc/haproxy/ssl /var/etc/haproxy/lua /var/etc/haproxy/errorfiles"
|
||||
HAPROXY_DIRS="/var/haproxy/var/run /var/etc/haproxy/ssl /var/etc/haproxy/lua /var/etc/haproxy/errorfiles"
|
||||
|
||||
for directory in ${HAPROXY_DIRS}; do
|
||||
mkdir -p ${directory}
|
||||
@@ -9,7 +9,7 @@ for directory in ${HAPROXY_DIRS}; do
|
||||
done
|
||||
|
||||
# chroot dir must not be writable
|
||||
chmod 550 /var/run/haproxy
|
||||
find /var/haproxy -type d -exec chmod 550 {} \;
|
||||
|
||||
# export required data to filesystem
|
||||
/usr/local/opnsense/scripts/OPNsense/HAProxy/exportCerts.php > /dev/null 2>&1
|
||||
|
||||
@@ -446,7 +446,7 @@ global
|
||||
uid 80
|
||||
{% endif %}
|
||||
gid 80
|
||||
chroot /var/run/haproxy
|
||||
chroot /var/haproxy
|
||||
daemon
|
||||
stats socket /var/run/haproxy.socket level admin
|
||||
nbproc {{OPNsense.HAProxy.general.tuning.nbproc}}
|
||||
|
||||
Reference in New Issue
Block a user