Skip to content

Commit 273f4de

Browse files
author
Serghey Rodin
committed
formatting: 79 characters per line
1 parent 477df2e commit 273f4de

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

install/vst-install-rhel.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,10 @@ if [ "$nginx" = 'yes' ]; then
868868
echo > /etc/nginx/conf.d/vesta.conf
869869
mkdir -p /var/log/nginx/domains
870870
if [ "$release" -eq 7 ]; then
871-
mkdir /etc/systemd/system/nginx.service.d/
872-
echo "[Service]" > /etc/systemd/system/nginx.service.d/limits.conf
873-
echo "LimitNOFILE=500000" >> /etc/systemd/system/nginx.service.d/limits.conf
871+
mkdir /etc/systemd/system/nginx.service.d
872+
cd /etc/systemd/system/nginx.service.d
873+
echo "[Service]" > limits.conf
874+
echo "LimitNOFILE=500000" >> limits.conf
874875
fi
875876
chkconfig nginx on
876877
service nginx start
@@ -911,9 +912,10 @@ if [ "$apache" = 'yes' ]; then
911912
mkdir -p /var/log/httpd/domains
912913
chmod 751 /var/log/httpd/domains
913914
if [ "$release" -eq 7 ]; then
914-
mkdir /etc/systemd/system/httpd.service.d/
915-
echo "[Service]" > /etc/systemd/system/httpd.service.d/limits.conf
916-
echo "LimitNOFILE=500000" >> /etc/systemd/system/httpd.service.d/limits.conf
915+
mkdir /etc/systemd/system/httpd.service.d
916+
cd /etc/systemd/system/httpd.service.d
917+
echo "[Service]" > limits.conf
918+
echo "LimitNOFILE=500000" >> limits.conf
917919
fi
918920
chkconfig httpd on
919921
service httpd start
@@ -1192,12 +1194,14 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
11921194
cd /usr/share/roundcubemail/plugins/password
11931195
wget $vestacp/roundcube/vesta.php -O drivers/vesta.php
11941196
wget $vestacp/roundcube/config.inc.php -O config.inc.php
1195-
sed -i "s/localhost/$servername/g" /usr/share/roundcubemail/plugins/password/config.inc.php
1197+
sed -i "s/localhost/$servername/g" \
1198+
/usr/share/roundcubemail/plugins/password/config.inc.php
11961199
chmod a+r /etc/roundcubemail/*
11971200
chmod -f 777 /var/log/roundcubemail
11981201
r="$(gen_pass)"
11991202
mysql -e "CREATE DATABASE roundcube"
1200-
mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
1203+
mysql -e "GRANT ALL ON roundcube.* TO
1204+
roundcube@localhost IDENTIFIED BY '$r'"
12011205
sed -i "s/%password%/$r/g" /etc/roundcubemail/config.inc.php
12021206
chmod 640 /etc/roundcubemail/config.inc.php
12031207
chown root:apache /etc/roundcubemail/config.inc.php
@@ -1239,8 +1243,12 @@ if [ "$fail2ban" = 'yes' ]; then
12391243
fi
12401244
chkconfig fail2ban on
12411245
/bin/mkdir -p /var/run/fail2ban
1242-
sed -i "s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/fail2ban/g" /usr/lib/systemd/system/fail2ban.service
1243-
systemctl daemon-reload
1246+
if [ -e "/usr/lib/systemd/system/fail2ban.service" ]; then
1247+
exec_pre='ExecStartPre=/bin/mkdir -p /var/run/fail2ban'
1248+
sed -i "s|\[Service\]|[Service]\n$exec_pre|g" \
1249+
/usr/lib/systemd/system/fail2ban.service
1250+
systemctl daemon-reload
1251+
fi
12441252
service fail2ban start
12451253
check_result $? "fail2ban start failed"
12461254
fi

0 commit comments

Comments
 (0)