summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2021-10-07 21:02:16 -0400
committerAndrew Cady <d@jerkface.net>2021-10-07 21:02:16 -0400
commitdde1fd94cfcac8cba4cd5d85a6b8006fdededf60 (patch)
tree4b02ec0af9a1f246691953786c304d751a07c27b
parent17c11ce600abe5a8ae18a403e05f09dc734a83a7 (diff)
fix failures to sudo when run as non-root userHEADmaster
-rw-r--r--selfpublish.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/selfpublish.sh b/selfpublish.sh
index 6ab7374..1d97356 100644
--- a/selfpublish.sh
+++ b/selfpublish.sh
@@ -149,7 +149,7 @@ control_file_file_check()
149 if ! diff -q "$2" "$tempout" 149 if ! diff -q "$2" "$tempout"
150 then 150 then
151 RESULT=1 151 RESULT=1
152 install -v -m "$3" "$tempout" -T "$2" 152 as_root install -v -m "$3" "$tempout" -T "$2"
153 fi 153 fi
154 header=$data 154 header=$data
155 continue 2 155 continue 2
@@ -545,7 +545,7 @@ equivocate()
545 then 545 then
546 as_root dpkg -r "${SELF_PACKAGE}" 546 as_root dpkg -r "${SELF_PACKAGE}"
547 dpkg_install "$DEB" 547 dpkg_install "$DEB"
548 install -m0644 "$DEB" "$DEBDEST" 548 as_root install -m0644 "$DEB" "$DEBDEST"
549 fi 549 fi
550 ) || exit 550 ) || exit
551} 551}
@@ -613,7 +613,7 @@ enable_apache_modules()
613 done 613 done
614 if [ "$restart" ] 614 if [ "$restart" ]
615 then 615 then
616 systemctl restart apache2 616 as_root systemctl restart apache2
617 fi 617 fi
618} 618}
619 619
@@ -968,11 +968,11 @@ configure_apache_vhost
968 968
969if [ $tls_result != 0 ] || force 969if [ $tls_result != 0 ] || force
970then 970then
971 systemctl restart apache2 971 as_root systemctl restart apache2
972 wait_for_certificate_issuance "$DOMAIN" 972 wait_for_certificate_issuance "$DOMAIN"
973 systemctl reload apache2 || systemctl restart apache2 973 as_root systemctl reload apache2 || as_root systemctl restart apache2
974else 974else
975 systemctl reload apache2 || systemctl restart apache2 975 as_root systemctl reload apache2 || as_root systemctl restart apache2
976fi 976fi
977 977
978check_tls "$DOMAIN" 978check_tls "$DOMAIN"