Skip to content

Commit c817c99

Browse files
committed
Add check for leading /.
1 parent 4ac24b0 commit c817c99

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bin/v-change-sys-pma

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ source $HESTIA/conf/hestia.conf
2323

2424
check_args '1' "$#" 'PMA'
2525

26+
# Check if string has leading /
27+
if [[ ! ${PMA:0:1} == "/" ]]; then
28+
PMA="/$PMA"
29+
fi
2630

2731
#----------------------------------------------------------#
2832
# Action #

bin/v-change-sys-webmail

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ source $HESTIA/conf/hestia.conf
2323

2424
check_args '1' "$#" 'WEBMAIL'
2525

26+
# Check if string has leading /
27+
if [[ ! ${WEBMAIL:0:1} == "/" ]]; then
28+
WEBMAIL="/$WEBMAIL"
29+
fi
2630

2731
#----------------------------------------------------------#
2832
# Action #

0 commit comments

Comments
 (0)