Skip to content

Commit db8bdfe

Browse files
committed
Use consistent shell syntax for testing
1 parent 9e56d05 commit db8bdfe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ for source in $(find /var/www/html/plugins -type f -name "*dist*"); do
121121
done
122122

123123
# Set timezone
124-
if test -f /usr/share/zoneinfo/${TZ}; then
124+
if [ -f /usr/share/zoneinfo/${TZ} ]; then
125125
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
126126

127127
INI_FILE="/usr/local/etc/php/conf.d/librebooking.ini"
@@ -137,19 +137,19 @@ log_flr=$(grep \
137137
log_flr=${log_flr:-${DFT_LOG_FLR}}
138138

139139
# Missing log directory
140-
if ! test -d "${log_flr}"; then
140+
if ! [ -d "${log_flr}" ]; then
141141
mkdir -p "${log_flr}"
142142
chown -R www-data:www-data "${log_flr}"
143143
fi
144144

145145
# Missing log file
146-
if ! test -f "${log_flr}/app.log"; then
146+
if ! [ -f "${log_flr}/app.log" ]; then
147147
touch "${log_flr}/app.log"
148148
chown www-data:www-data "${log_flr}/app.log"
149149
fi
150150

151151
# A URL path prefix was set
152-
if ! test -z "${LB_PATH}"; then
152+
if ! [ -z "${LB_PATH}" ]; then
153153
## Set server document root 1 directory up
154154
sed \
155155
-i /etc/apache2/sites-enabled/000-default.conf \

0 commit comments

Comments
 (0)