2023-10-20 00:48:58 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-10-20 02:09:20 +02:00
|
|
|
if ! [ -d "servers/${1:-$HOSTNAME}" ]; then
|
|
|
|
echo "setting up servers/${1:-$HOSTNAME}..."
|
|
|
|
cp -r servers/skel/. servers/${1:-$HOSTNAME}
|
2023-10-20 02:43:56 +02:00
|
|
|
sed -i "s/localhost/${1:-$HOSTNAME}.ixvd.net/g" servers/${1:-$HOSTNAME}/docker-compose.d/custom/nginx/conf.d/default.conf
|
2023-10-20 02:46:00 +02:00
|
|
|
sed -i "s/localhost/${1:-$HOSTNAME}.ixvd.net/g" servers/${1:-$HOSTNAME}/docker-compose.d/docker-compose.yml
|
2023-10-20 02:09:20 +02:00
|
|
|
echo "server configuration for \`${1:-$HOSTNAME}\`." >servers/${1:-$HOSTNAME}/README.md
|
2023-10-20 02:43:56 +02:00
|
|
|
fi
|