From c57f5f73b6c1c77a86ba744bcbf30359ffc18b90 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 21 Feb 2023 07:39:05 -0600 Subject: [PATCH] Update postinstall.sh to add check_dir_permission.sh to sudo file --- misc/postinstall.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/postinstall.sh b/misc/postinstall.sh index a2b220be..9231522a 100755 --- a/misc/postinstall.sh +++ b/misc/postinstall.sh @@ -142,12 +142,13 @@ case "$1" in fi # Allow update_subdomain_certs.sh script to run as www-data + # Allow www-data to run check_dir_permission.sh as the Bluecherry user chown root:www-data /usr/share/bluecherry/scripts/update_subdomain_certs.sh chmod 550 /usr/share/bluecherry/scripts/update_subdomain_certs.sh - echo "www-data ALL=(ALL) NOPASSWD: /usr/share/bluecherry/scripts/update_subdomain_certs.sh" \ + echo "www-data ALL=(ALL) NOPASSWD: /usr/share/bluecherry/scripts/update_subdomain_certs.sh\nwww-data ALL=(ALL) NOPASSWD: /usr/share/bluecherry/scripts/check_dir_permissions.sh" \ > /etc/sudoers.d/www-data chmod 0440 /etc/sudoers.d/www-data - + mkdir -p /usr/share/bluecherry/ssl cp /etc/ssl/certs/ssl-cert-snakeoil.pem /usr/share/bluecherry/ssl/bluecherry-snakeoil.pem cp /etc/ssl/private/ssl-cert-snakeoil.key /usr/share/bluecherry/ssl/bluecherry-snakeoil.key