Skip to content

Commit

Permalink
move envars settings via /etc/default in init.d scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy92 committed Jan 27, 2015
1 parent 520ffaf commit 88c7c42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ ${{template_declares}}
declare java_cmd=$(get_java_cmd)


# if configuration files exist, source it and use JAVA_OPTS to prepend their contents to $@
[[ -f "$script_conf_file" ]] && . "$script_conf_file"
# use JAVA_OPTS to prepend its contents to $@
set -- "$JAVA_OPTS" "$@"

run "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
source /lib/init/vars.sh
source /lib/lsb/init-functions

# if configuration files exist, source it and use JAVA_OPTS to prepend their contents to $@
[[ -f /etc/default/${{app_name}} ]] && . /etc/default/${{app_name}}
# $JAVA_OPTS used in $RUN_CMD wrapper
export JAVA_OPTS

PIDFILE=/var/run/${{app_name}}/running.pid

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
# Source function library.
. /etc/rc.d/init.d/functions

# if configuration files exist, source it and use JAVA_OPTS to prepend their contents to $@
[[ -f /etc/default/${{app_name}} ]] && . /etc/default/${{app_name}}
# $JAVA_OPTS used in $RUN_CMD wrapper
export JAVA_OPTS

prog="${{exec}}"

# FIXME The pid file should be handled by the executed script
Expand Down

0 comments on commit 88c7c42

Please sign in to comment.