Skip to content

Commit 35f319c

Browse files
author
Robert Kummer
authored
Update init.sh
1 parent 1cf5981 commit 35f319c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

init.sh

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ if [ -z "$QUEUE_NAME" ]; then
88
QUEUE_NAME="default"
99
fi
1010

11-
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
12-
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
13-
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
11+
if [ -z "$LARAVEL_HORIZON" ]; then
12+
LARAVEL_HORIZON=false
13+
fi
14+
15+
if [ "$LARAVEL_HORIZON" = false ]; then
16+
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
17+
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
18+
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
19+
fi
20+
21+
if [ "$LARAVEL_HORIZON" = true ]; then
22+
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
23+
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
24+
/etc/supervisor/conf.d/laravel-horizon.conf.tpl > /etc/supervisor/supervisord.conf
25+
fi
1426

1527
supervisord --nodaemon --configuration /etc/supervisor/supervisord.conf

0 commit comments

Comments
 (0)