From c31e5c9e0e237567095b367e165ef4dcc068da6e Mon Sep 17 00:00:00 2001 From: hitlerrip Date: Tue, 5 Aug 2025 18:15:12 +0200 Subject: pub.sh added an actual wrapper around the build script, which was my intention with `run.sh` --- run.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'run.sh') diff --git a/run.sh b/run.sh index de92498..2e7ba85 100755 --- a/run.sh +++ b/run.sh @@ -5,6 +5,7 @@ echo "# WEBSERVER RUNNER #" echo "# »» hitler.rip «« #" echo "####################" echo +echo "[run] This script sets up my web servers the way I like it." echo "[run] Note:" echo "[run] this script assumes you already have an openssh server set up properly." echo @@ -169,7 +170,9 @@ server { } EOF sudo mkdir -p /srv/web/ -sudo chown -R $(whoami) /srv/web/ +sudo mkdir -p /srv/build/ +sudo chown -R $(whoami):$(whoami) /srv/web/ +sudo chown -R $(whoami):$(whoami) /srv/build/ sudo systemctl restart nginx sudo systemctl enable nginx @@ -177,10 +180,12 @@ echo "[run] setting up git server..." sudo adduser --shell $(which git-shell) git sudo mkdir /home/git/.ssh/ sudo cp ~/.ssh/authorized_keys /home/git/.ssh/ -sudo chown -R git /home/git/.ssh/ +sudo chown -R git:git /home/git/.ssh/ sudo chmod 700 /home/git/.ssh/ sudo chmod 600 /home/git/.ssh/authorized_keys sudo mkdir -p /srv/git/ -sudo chown -R git /srv/git/ +sudo chown -R git:git /srv/git/ sudo mkdir -p /srv/pgit/ -sudo chown -R git /srv/pgit/ +sudo chown -R git:git /srv/pgit/ +git config --global --add safe.directory '*' # to allow the server to clone its own repos +echo "[run] git server created. you may now clone the website build script to /srv/build/ and push your website." -- cgit v1.2.3