From 04e771b1eb0a669761debfd67d778e01293ca40d Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 24 Feb 2024 13:11:47 +0100 Subject: [PATCH] directus tmux et caddy 3 --- install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index a0daf56..ea65225 100644 --- a/install.sh +++ b/install.sh @@ -98,7 +98,7 @@ if [[ "$answer" == "y" ]]; then curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list apt update apt install -y caddy - echo "" > /etc/caddy/Caddyfile + > /etc/caddy/Caddyfile fi # @@ -261,13 +261,14 @@ if [[ "$answer" == "y" ]]; then npx directus bootstrap" $username session="directus" - tmux new-session -d -s $session - tmux send-keys -t $session "cd /home/${username}/${cms_folder} && npx directus start" C-m + su -c "tmux new-session -d -s ${session} &&\ + tmux send-keys -t ${session} \"cd /home/${username}/${cms_folder} && npx directus start\" C-m" $username caddyfile="/etc/caddy/Caddyfile" echo "cms.${domain_name} {" >> $caddyfile - echo " reverse_proxy ${ip}:${port}" >> $caddyfile + echo "reverse_proxy ${ip}:${port}" >> $caddyfile echo "}" >> $caddyfile + caddy fmt $caddyfile -w caddy reload -c $caddyfile fi