Skip to content

Commit

Permalink
Update postinstall.sh to add check_dir_permission.sh to sudo file
Browse files Browse the repository at this point in the history
  • Loading branch information
curtishall authored and divsbhalala committed Feb 21, 2023
1 parent 2fc92eb commit 1c434b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions misc/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c434b9

Please sign in to comment.