Allow sourcing start script, even if SERVICE_RUN is unset
This commit is contained in:
parent
bada5fe2c0
commit
fcf7787ace
@ -8,10 +8,6 @@ for SERVICE in "${SERVICE_REQUIRE[@]}"; do
|
||||
done
|
||||
|
||||
echo "[$APP_NAME] Starting '$1' ..."
|
||||
if [ "$SERVICE_RUN" = "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if "$APP" service_running "$1"; then
|
||||
echo "Service is already running."
|
||||
exit 0
|
||||
@ -21,6 +17,10 @@ if [ -e "$APP_SERVICES/$1/start" ]; then
|
||||
source "$APP_SERVICES/$1/start"
|
||||
fi
|
||||
|
||||
if [ "$SERVICE_RUN" = "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SERVICE_RUN_RAW="cd \"$SERVICE_CD\"; exec ${SERVICE_RUN//"/\\"}"
|
||||
if [ "$SERVICE_SCREEN" = "1" ]; then
|
||||
screen -dmS "$SERVICE_SCREEN_NAME" gosu "$SERVICE_USER" bash -c "$SERVICE_RUN_RAW"
|
||||
|
Loading…
Reference in New Issue
Block a user