xinetd: include additional (runtime) directory in configuration file
The additional directory is created and can be used e.g. for configurations which are created e.g. dynamically from an uci config. Signed-off-by: Helge Mader <ma@dev.tdt.de>
This commit is contained in:
parent
4a3e547f5d
commit
90ab809f7f
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@ PIDFILE="/var/run/xinetd.pid"
|
||||||
|
|
||||||
CONF_FILE="/etc/config/xinetd"
|
CONF_FILE="/etc/config/xinetd"
|
||||||
GENERATED_CONF_FILE="/var/run/xinetd.conf"
|
GENERATED_CONF_FILE="/var/run/xinetd.conf"
|
||||||
|
OTHER_CONF_DIR="/tmp/xinetd.d"
|
||||||
|
|
||||||
ServiceEntry="false"
|
ServiceEntry="false"
|
||||||
ListName=""
|
ListName=""
|
||||||
|
@ -101,11 +102,14 @@ generate_config() {
|
||||||
echo "}" >> $GENERATED_CONF_FILE
|
echo "}" >> $GENERATED_CONF_FILE
|
||||||
echo "" >> $GENERATED_CONF_FILE
|
echo "" >> $GENERATED_CONF_FILE
|
||||||
echo "includedir /etc/xinetd.d" >> $GENERATED_CONF_FILE
|
echo "includedir /etc/xinetd.d" >> $GENERATED_CONF_FILE
|
||||||
|
echo "includedir $OTHER_CONF_DIR" >> $GENERATED_CONF_FILE
|
||||||
|
|
||||||
config_load xinetd
|
config_load xinetd
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
mkdir -p $OTHER_CONF_DIR
|
||||||
|
|
||||||
generate_config
|
generate_config
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
Loading…
Reference in a new issue