File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
SOURCE_DIR=/usr/src
3
+ DEST_BASE_DIR=" "
4
+ SYSTEMD_NAME=haproxy.service
3
5
HAPROXY_VERSION=1.9.1
4
6
LUA_VERSION=5.3.5
5
7
@@ -8,7 +10,7 @@ install_luajwt_var=false
8
10
rhel_based=false
9
11
debian_based=false
10
12
lua_installed=false
11
- lua_dep_dir=/usr/local/share/lua/5.3/
13
+ lua_dep_dir=$DEST_BASE_DIR /usr/local/share/lua/5.3/
12
14
13
15
if [ -f /etc/redhat-release ]; then
14
16
rhel_based=true
@@ -61,8 +63,8 @@ build_haproxy() {
61
63
62
64
install_rhel_haproxy () {
63
65
printf " \r[+] Installing HAProxy\n"
64
- /bin/cp $SOURCE_DIR /haproxy-$HAPROXY_VERSION /haproxy /usr/sbin/
65
- mkdir -p /etc/haproxy/pem
66
+ /bin/cp $SOURCE_DIR /haproxy-$HAPROXY_VERSION /haproxy $DEST_BASE_DIR /usr/sbin/
67
+ mkdir -p $DEST_BASE_DIR /etc/haproxy/pem
66
68
}
67
69
68
70
install_deb_haproxy () {
@@ -76,8 +78,8 @@ install_deb_haproxy() {
76
78
install_haproxy_systemd () {
77
79
cd $SOURCE_DIR /haproxy-$HAPROXY_VERSION /contrib/systemd
78
80
make clean > /dev/null
79
- make PREFIX=/usr > /dev/null
80
- /bin/cp haproxy.service /usr/lib/systemd/system/
81
+ make PREFIX=$DEST_BASE_DIR /usr > /dev/null
82
+ /bin/cp haproxy.service /usr/lib/systemd/system/$SYSTEMD_NAME
81
83
systemctl daemon-reload
82
84
}
83
85
You can’t perform that action at this time.
0 commit comments