]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
haproxy: Provide a better example configuration that works
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Apr 2015 12:38:38 +0000 (14:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Apr 2015 12:35:54 +0000 (14:35 +0200)
config/haproxy/haproxy.cfg
lfs/haproxy
src/paks/haproxy/install.sh [new file with mode: 0644]
src/paks/haproxy/uninstall.sh [new file with mode: 0644]
src/paks/haproxy/update.sh [new file with mode: 0644]

index 324ad5e2290ebb2d4afd662463830c1636111b61..9d372f63fbccff96c01afccf4f90613279ec0e7c 100644 (file)
@@ -28,8 +28,8 @@ global
     chroot      /var/lib/haproxy
     pidfile     /var/run/haproxy.pid
     maxconn     4000
-    user        haproxy
-    group       haproxy
+    user        nobody
+    group       nobody
     daemon
 
     # turn on stats unix socket
index febb65a5d3718b164f2409a0c5596bfe96b09510..4af22730772d6f7205890048af8b8ed26ed98420 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = haproxy
-PAK_VER    = 1
+PAK_VER    = 2
 
 DEPS       = ""
 
diff --git a/src/paks/haproxy/install.sh b/src/paks/haproxy/install.sh
new file mode 100644 (file)
index 0000000..45b2161
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+
+# Enable autostart
+ln -sf  ../init.d/haproxy /etc/rc.d/rc0.d/K25haproxy
+ln -sf  ../init.d/haproxy /etc/rc.d/rc3.d/S35haproxy
+ln -sf  ../init.d/haproxy /etc/rc.d/rc6.d/K25haproxy
diff --git a/src/paks/haproxy/uninstall.sh b/src/paks/haproxy/uninstall.sh
new file mode 100644 (file)
index 0000000..b01ee11
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+remove_files
+rm -rfv /etc/rc.d/rc*.d/*haproxy
diff --git a/src/paks/haproxy/update.sh b/src/paks/haproxy/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh