diff options
author | hitlerrip <git@hitler.rip> | 2025-08-05 18:15:12 +0200 |
---|---|---|
committer | hitlerrip <git@hitler.rip> | 2025-08-05 18:15:12 +0200 |
commit | c31e5c9e0e237567095b367e165ef4dcc068da6e (patch) | |
tree | 933aa24cf5bf3e7e2be71c84ae5f4c1d56a6960e /run.sh | |
parent | 82beff57670795171ab994c4c63ed861bc1fb3af (diff) | |
download | website-c31e5c9e0e237567095b367e165ef4dcc068da6e.tar.gz website-c31e5c9e0e237567095b367e165ef4dcc068da6e.tar.bz2 website-c31e5c9e0e237567095b367e165ef4dcc068da6e.zip |
pub.sh
added an actual wrapper around the build script, which was my intention
with `run.sh`
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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." |