Skip to content

Commit 230a060

Browse files
committed
Fix some issues in alias change scripts.
1 parent 0ae127e commit 230a060

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

bin/v-change-sys-pma

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: change phpmyadmin alias url
3-
# options: PORT
3+
# options: PMA
44
#
55
# The function is to change the phpmyadmin url in apache2 or nginx configuration.
66

@@ -39,18 +39,18 @@ if [ -f /etc/nginx/conf.d/phpmyadmin.inc ]; then
3939
fi
4040

4141
# Check if alias is different for apach2
42-
if [ -z "$apache2_pma" ];
43-
if [ ! "$apache2_pma" = "$PMA" ]; then
42+
if [ -z "$apache_pma" ]; then
43+
if [ ! "$apache_pma" = "$PMA" ]; then
4444
# Replace pma alias in config files.
45-
sed -i "s|Alias $nginx_pma|Alias $PMA|" /etc/apache2/conf.d/phpmyadmin.conf
45+
sed -i "s|Alias $apache_pma|Alias $PMA|" /etc/apache2/conf.d/phpmyadmin.conf
4646

4747
# Restart services
4848
$HESTIA/bin/v-restart-service apache2
4949
fi
5050
fi
5151

5252
# Check if alias is different for nginx
53-
if [ -z "$nginx_pma" ];
53+
if [ -z "$nginx_pma" ]; then
5454
if [ ! "$nginx_pma" = "$PMA" ]; then
5555
# Replace pma alias in config files.
5656
sed -i "s|$nginx_pma|$PMA|" /etc/nginx/conf.d/phpmyadmin.inc

bin/v-change-sys-webmail

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: change webmail alias url
3-
# options: PORT
3+
# options: WEBMAIL
44
#
55
# The function is to change the webmail url in apache2 or nginx configuration.
66

@@ -21,7 +21,7 @@ source $HESTIA/conf/hestia.conf
2121
# Verifications #
2222
#----------------------------------------------------------#
2323

24-
check_args '1' "$#" 'PMA'
24+
check_args '1' "$#" 'WEBMAIL'
2525

2626

2727
#----------------------------------------------------------#
@@ -39,18 +39,18 @@ if [ -f /etc/nginx/conf.d/roundcube.inc ]; then
3939
fi
4040

4141
# Check if alias is different for apach2
42-
if [ -z "$apache2_webmail" ];
43-
if [ ! "$apache2_webmail" = "$WEBMAIL" ]; then
42+
if [ -z "$apache_webmail" ]; then
43+
if [ ! "$apache_webmail" = "$WEBMAIL" ]; then
4444
# Replace webmail alias in config files.
45-
sed -i "s|Alias $nginx_webmail|Alias $WEBMAIL|" /etc/apache2/conf.d/roundcube.conf
45+
sed -i "3/s|Alias $apache_webmail|Alias $WEBMAIL|" /etc/apache2/conf.d/roundcube.conf
4646

4747
# Restart services
4848
$HESTIA/bin/v-restart-service apache2
4949
fi
5050
fi
5151

5252
# Check if alias is different for nginx
53-
if [ -z "$nginx_webmail" ];
53+
if [ -z "$nginx_webmail" ]; then
5454
if [ ! "$nginx_webmail" = "$WEBMAIL" ]; then
5555
# Replace webmail alias in config files.
5656
sed -i "s|$nginx_webmail|$WEBMAIL|" /etc/nginx/conf.d/webmail.inc

0 commit comments

Comments
 (0)