Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/etc/services.d/haproxy/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/execlineb -P
#!/usr/bin/with-contenv sh

with-contenv
/usr/local/sbin/haproxy -W -db -f /etc/haproxy/haproxy.cfg -f /etc/haproxy/haproxy-aux.cfg
MEMLIMIT=$(free -m | awk '/Mem:/ {print int($2 * 2 / 3)}')

exec /usr/local/sbin/haproxy -W -db -m "${MEMLIMIT}" -f /etc/haproxy/haproxy.cfg -f /etc/haproxy/haproxy-aux.cfg

0 comments on commit f1d9cc0

Please sign in to comment.