diff --git a/conf/type/__init_script/gencode-remote b/conf/type/__init_script/gencode-remote index d9e56970..9b493cfc 100644 --- a/conf/type/__init_script/gencode-remote +++ b/conf/type/__init_script/gencode-remote @@ -19,12 +19,20 @@ # # -if [ -f "$__object/parameter/service" ]; then - service=$(cat "$__object/parameter/service") +if [ -f "$__object/parameter/script" ]; then + script=$(cat "$__object/parameter/script") else - service="/$__object_id" + script="/$__object_id" fi +if [ -f "$__object/parameter/base_dir" ]; then + base_dir=$(cat "$__object/parameter/base_dir") +else + base_dir="/etc/init.d" +fi + + + mode=$(cat "$__object/parameter/mode") -echo "/etc/init.d/${service} ${mode}" +echo "${base_dir}/${script} ${mode}" diff --git a/conf/type/__init_script/man.text b/conf/type/__init_script/man.text index 34065260..898943a5 100644 --- a/conf/type/__init_script/man.text +++ b/conf/type/__init_script/man.text @@ -23,8 +23,10 @@ OPTIONAL PARAMETERS ------------------- script:: If supplied, use this as the init-script. - Otherwise the object_id is used. The script will be pretended with '/etc/init.d/' + Otherwise the object_id is used. +base_dir:: + If supplied, this type uses this directory instead of '/etc/init.d'. The parameter will not need an ending slash. EXAMPLES -------- diff --git a/conf/type/__init_script/parameter/optional b/conf/type/__init_script/parameter/optional index 84f7e31d..5551a8f2 100644 --- a/conf/type/__init_script/parameter/optional +++ b/conf/type/__init_script/parameter/optional @@ -1 +1,2 @@ script +base_dir