xinetd: include additional (runtime) directory in configuration file
authorHelge Mader <redacted>
Fri, 23 Oct 2020 08:15:03 +0000 (10:15 +0200)
committerHelge Mader <redacted>
Fri, 23 Oct 2020 09:14:44 +0000 (11:14 +0200)
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 <redacted>
net/xinetd/files/xinetd.init

index 188dcfcc6cfdc6d75b664cbcf6423c7d087dc522..207122381745fe3e1347893199326527f578113d 100644 (file)
@@ -12,6 +12,7 @@ PIDFILE="/var/run/xinetd.pid"
 
 CONF_FILE="/etc/config/xinetd"
 GENERATED_CONF_FILE="/var/run/xinetd.conf"
+OTHER_CONF_DIR="/tmp/xinetd.d"
 
 ServiceEntry="false"
 ListName=""
@@ -101,11 +102,14 @@ generate_config() {
        echo "}" >> $GENERATED_CONF_FILE
        echo "" >> $GENERATED_CONF_FILE
        echo "includedir /etc/xinetd.d" >> $GENERATED_CONF_FILE
+       echo "includedir $OTHER_CONF_DIR" >> $GENERATED_CONF_FILE
 
        config_load xinetd
 }
 
 start_service() {
+       mkdir -p $OTHER_CONF_DIR
+
        generate_config
 
        procd_open_instance
git clone https://git.99rst.org/PROJECT