diff options
author | Christopher Walker <kris240376@gmail.com> | 2011-03-07 11:21:28 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-03-07 11:21:28 -0300 |
commit | e1f98f7da255fb536738ce5087f217695f0b84bc (patch) | |
tree | 2d98ec6610279c914fac410d8e145ccd1a7c5e9e /network/openvpn-auth-ldap/doinst.sh | |
parent | 2bc318e85e08f1fad6bc9b36c405dc4e03a6268a (diff) |
network/openvpn-auth-ldap: (LDAP authentication and authorization)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/openvpn-auth-ldap/doinst.sh')
-rw-r--r-- | network/openvpn-auth-ldap/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/network/openvpn-auth-ldap/doinst.sh b/network/openvpn-auth-ldap/doinst.sh new file mode 100644 index 0000000000000..90f1068f774b0 --- /dev/null +++ b/network/openvpn-auth-ldap/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/openvpn/auth-ldap.conf.new + |