diff options
Diffstat (limited to 'debian/strongswan-starter.postinst')
-rw-r--r-- | debian/strongswan-starter.postinst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/strongswan-starter.postinst b/debian/strongswan-starter.postinst index 98de3493c..52e895a88 100644 --- a/debian/strongswan-starter.postinst +++ b/debian/strongswan-starter.postinst @@ -119,6 +119,12 @@ disable_daemon_start() { fi } +setup_strongswan_user() { + if ! getent passwd strongswan >/dev/null; then + adduser --quiet --system --no-create-home --home /var/lib/strongswan --shell /usr/sbin/nologin strongswan + fi +} + . /usr/share/debconf/confmodule case "$1" in @@ -285,6 +291,9 @@ EOF # disable_daemon_start "charon" "IKEv2" #fi + # create user for strongswan to change its uid into + setup_strongswan_user + if [ -z "$2" ]; then # no old configured version - start strongswan now invoke-rc.d ipsec start || true |