diff options
author | Yth - Arnaud <yth@ythogtha.org> | 2018-05-07 21:41:08 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-05-12 06:58:24 +0700 |
commit | e730a86e9df1e6b8a6ff24f14cf92ee467ff5db7 (patch) | |
tree | 8fce1e55d6a5f35e4e885ad769d9329ef2707456 /network/glewlwyd/doinst.sh | |
parent | 30e5aa6224f28246794aaf30c27e8ed16b6c69a8 (diff) |
network/glewlwyd: Added (Oauth 2 authentication server).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/glewlwyd/doinst.sh')
-rw-r--r-- | network/glewlwyd/doinst.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/network/glewlwyd/doinst.sh b/network/glewlwyd/doinst.sh new file mode 100644 index 000000000000..21e47e39984d --- /dev/null +++ b/network/glewlwyd/doinst.sh @@ -0,0 +1,24 @@ +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... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + |