diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-07-15 11:26:03 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-07-15 13:22:36 +0200 |
commit | cca6b44de6e16cfe749bbfacf2d18c8165e17bf3 (patch) | |
tree | 82a8e19a12debe66efe38624997352d8109a3655 /debian/config | |
parent | c7b0009e1dd494b41000bc6c615225888a79f691 (diff) |
Add debconf question to enable automatic service restarts
Diffstat (limited to 'debian/config')
-rw-r--r-- | debian/config | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..7497f7d --- /dev/null +++ b/debian/config @@ -0,0 +1,21 @@ +#!/bin/sh -e + +APT_CONF=/etc/apt/apt.conf.d/20services + +. /usr/share/debconf/confmodule +db_version 2.0 + +if [ -f $APT_CONF ]; then + CURRENT=$(sed -ne 's,^\s*Whatmaps::Enable-Restart\s\+"\(\S\+\)"\s*;,\1,p' $APT_CONF) + case $CURRENT in + 1|true) + CURRENT="true" + ;; + *) CURRENT="false" + ;; + esac + db_set whatmaps/enable_service_restarts $CURRENT +fi + +db_input medium whatmaps/enable_service_restarts || true +db_go |