Skip to content

Commit 985ef8c

Browse files
authored
Merge pull request #511 from StackStorm/fix/env-vars-export
Fix ENV vars export consistency in service configs (different platforms)
2 parents d010853 + f7380d8 commit 985ef8c

30 files changed

+62
-0
lines changed

packages/st2/debian/st2.st2actionrunner-worker.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ script
2121
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2222

2323
# Read configuration variable file if it is present
24+
set -o allexport
2425
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
26+
set +o allexport
2527

2628
# Load global locale settings
2729
test -f /etc/default/locale && . /etc/default/locale || true

packages/st2/debian/st2.st2actionrunner.upstart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pre-start script
1919
WORKERS=${WORKERS:-2}
2020

2121
# Read configuration variable file if it is present
22+
set -o allexport
2223
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
24+
set +o allexport
2325
for i in `seq 1 $WORKERS`; do
2426
start st2actionrunner-worker WORKERID=$i || :
2527
done
@@ -32,7 +34,9 @@ post-stop script
3234
WORKERS=${WORKERS:-10}
3335

3436
# Read configuration variable file if it is present
37+
set -o allexport
3538
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
39+
set +o allexport
3640
for i in `seq 1 $WORKERS`; do
3741
stop st2actionrunner-worker WORKERID=$i || :
3842
done

packages/st2/debian/st2.st2api.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="-k eventlet -b 127.0.0.1:9101 --workers 1 --threads 1 --graceful-timeout 10 --timeout 30"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/gunicorn st2api.wsgi:application $DAEMON_ARGS
2628
end script

packages/st2/debian/st2.st2auth.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="-k eventlet -b 127.0.0.1:9100 --workers 1 --threads 1 --graceful-timeout 10 --timeout 30"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/gunicorn st2auth.wsgi:application $DAEMON_ARGS
2628
end script

packages/st2/debian/st2.st2exporter.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

packages/st2/debian/st2.st2garbagecollector.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

packages/st2/debian/st2.st2notifier.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

packages/st2/debian/st2.st2resultstracker.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

packages/st2/debian/st2.st2rulesengine.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

packages/st2/debian/st2.st2sensorcontainer.upstart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ script
2020
DAEMON_ARGS="--config-file /etc/st2/st2.conf"
2121

2222
# Read configuration variable file if it is present
23+
set -o allexport
2324
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
25+
set +o allexport
2426

2527
exec /opt/stackstorm/st2/bin/$NAME ${DAEMON_ARGS}
2628
end script

0 commit comments

Comments
 (0)