Updated user and added section for collecting user password

This commit is contained in:
corybiscuit 2025-08-24 13:31:23 -04:00
parent 08a216b90f
commit 4295b9448b

View file

@ -2,11 +2,17 @@
# This script builds the documentation site using MkDocs and serves it to the Caddy web server.
# Build the documentation site
echo "Building documentation site..."
rm -rf ./site
mkdocs build --clean
# Collect ssh password
echo "Enter SSH password for cory@10.10.10.40:"
read -s SSH_PASSWORD
echo "Thank you! Your password has been securely collected."
# Clean up the web server directory
ssh webmaster@10.10.10.40 'sudo rm -rf /usr/share/caddy/docs.bsct.me/*'
sshpass -p "$SSH_PASSWORD" ssh cory@10.10.10.40 'sudo rm -rf /var/caddy/docs.bsct.io/www/*'
# Copy the built documentation to the web server
scp -r ./site/* webmaster@10.10.10.40:/usr/share/caddy/docs.bsct.me
sshpass -p "$SSH_PASSWORD" scp -r ./site/* cory@10.10.10.40:/var/caddy/docs.bsct.io/www/