From 13cce99dba87312f6f5d260d0b39525353af6705 Mon Sep 17 00:00:00 2001 From: Stephen Cochrane Date: Thu, 15 Oct 2020 00:11:44 +0200 Subject: [PATCH] Finished for tonight --- nginxd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nginxd b/nginxd index a62ff57..3993af6 100755 --- a/nginxd +++ b/nginxd @@ -51,8 +51,12 @@ done # Available units units=( git blog wiki irc proj all ) -unitsd=${unitsd-"./units"} +unitsd=${unitsd:="./units"} # Check that a valid unit was given. [[ ! " ${units[@]} " =~ " ${unit} " ]] && error "The unit <$unit> does not exist." 1 \ || echo "Unit <$unit> found!" + +# Everything is valid, start setting up. +cp $unitsd/* /etc/nginx/sites-available/ +# TODO: Setup links, and delete links if needed