neb/tools/repo/setup-server-folder.sh
2023-10-20 02:43:56 +02:00

8 lines
No EOL
373 B
Bash

#!/bin/sh
if ! [ -d "servers/${1:-$HOSTNAME}" ]; then
echo "setting up servers/${1:-$HOSTNAME}..."
cp -r servers/skel/. servers/${1:-$HOSTNAME}
sed -i "s/localhost/${1:-$HOSTNAME}.ixvd.net/g" servers/${1:-$HOSTNAME}/docker-compose.d/custom/nginx/conf.d/default.conf
echo "server configuration for \`${1:-$HOSTNAME}\`." >servers/${1:-$HOSTNAME}/README.md
fi