domtool-publish: try to grab tokens if aklog is available release_20181012
authorClinton Ebadi <clinton@unknownlamer.org>
Fri, 12 Oct 2018 05:12:28 +0000 (01:12 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 12 Oct 2018 05:12:28 +0000 (01:12 -0400)
sudo on Debian Jessie and later drops tokens (but not kerberos
tickets), make sure to refresh tokens so syncing files from afs
doesn't fail.

scripts/domtool-publish

index 0f75802..1f1129e 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/sh -e
 
+# grab tokens in case they were dropped by sudo
+if [ -x "$(which aklog)" ]; then
+    aklog
+fi
+
 redo_exim() {
         sudo -u domtool touch /var/domtool/local_domains.cfg /var/domtool/relay_domains.cfg /var/domtool/mailman_domains.cfg
        /bin/echo -n "domainlist local_domains = " >/etc/exim4/conf.d/main/10_domtool-domains