fix: add some stuff to script

This commit is contained in:
Strix 2023-10-20 02:09:20 +02:00
parent b9950596bb
commit 253dbe741c
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

View file

@ -1,3 +1,7 @@
#!/bin/sh
cp -r servers/skel/. servers/${1:-$(hostname)}
if ! [ -d "servers/${1:-$HOSTNAME}" ]; then
echo "setting up servers/${1:-$HOSTNAME}..."
cp -r servers/skel/. servers/${1:-$HOSTNAME}
echo "server configuration for \`${1:-$HOSTNAME}\`." >servers/${1:-$HOSTNAME}/README.md
fi