forked from rapyd-cloud/rapyd-vz-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrapyd-relay-dependencies.sh
53 lines (33 loc) · 1.45 KB
/
rapyd-relay-dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#must be run as sudo su - / root
#################################################################################
if grep -a 'AlmaLinux' /etc/system-release ; then
cd ~
sudo yum install -y compat-openssl11
else
cd ~
sudo yum install -y openssl11-libs
fi
#################################################################################
# install relay required so library updates
cd /usr/local/lsws/lsphp/etc/php.d
rm -f 996-rapyd-relay.ini
wget https://raw.githubusercontent.com/rapyd-cloud/rapyd-vz-support/main/996-rapyd-relay.ini
chown litespeed:litespeed 996-rapyd-relay.ini
#################################################################################
# alter redis to be non-persistent
if [ -f "/etc/redis.conf" ]; then
sed -i '/save \"\"/c\save \"\"' /etc/redis.conf
sed -i '/save 900 1/c\#save 900 1' /etc/redis.conf
sed -i '/save 300 10/c\#save 300 10' /etc/redis.conf
sed -i '/save 60 10000/c\#save 60 10000' /etc/redis.conf
fi
#################################################################################
# fix double igbinary definition
if [ -f "/usr/local/lsws/lsphp/etc/php.d/40-igbinary.ini" ]; then
if [ -f "/usr/local/lsws/lsphp/etc/php.d/50-redis.ini" ]; then
sed -i '/extension = igbinary.so/c\;extension = igbinary.so' /usr/local/lsws/lsphp/etc/php.d/50-redis.ini
fi
fi
#################################################################################
#end relay dependencies deployment