forked from ungleich-public/cdist
additional parameter base_dir
This commit is contained in:
parent
5f1afb08f6
commit
342cbca533
3 changed files with 16 additions and 5 deletions
conf/type/__init_script
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
--------
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
script
|
||||
base_dir
|
||||
|
|
Loading…
Reference in a new issue