directus tmux et caddy 3

This commit is contained in:
Valentin 2024-02-24 13:11:47 +01:00
parent f9f2fdf702
commit 04e771b1eb
1 changed files with 5 additions and 4 deletions

View File

@ -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