From 4486a57079eb03adf048e38a3c7cca35cccfbd12 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 24 Feb 2024 21:55:20 +0100 Subject: [PATCH] directus tmux et caddy 14 --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 58d008a..0b6ff9b 100644 --- a/install.sh +++ b/install.sh @@ -256,22 +256,22 @@ if [[ "$answer" == "y" ]]; then echo \"KEY='${key}'\" >> ${env_file} &&\ cd ${cms_folder} &&\ npm init -y &&\ - npx directus bootstrap" $username + npx directus bootstrap --skipAdminInit" $username session="directus" su -c "tmux new-session -d -s ${session} &&\ tmux send-keys -t ${session} \"cd /home/${username}/${cms_folder} && npx directus start\" C-m" $username - admin_role_uuid=$(echo $(mariadb -u directus -p${db_directus_password} -e "select id from directus.directus_roles where name='Administrator'") | awk '{print $2}') - echo -e "${PURPLE}${BOLD}${admin_role_uuid}${RESET}" - - cd "/home/${username}/${cms_folder}" - npx directus users create --email "${directus_admin_email}" --password "${directus_admin_password}" --role "${admin_role_uuid}" + admin_role_uuid=$(echo $(mariadb -u directus -p${db_directus_password} \ + -e "select id from directus.directus_roles where name='Administrator'") | awk '{print $2}') + + su -c "cd "/home/${username}/${cms_folder}" &&\ + npx directus users create --email \"${directus_admin_email}\" \ + --password \"${directus_admin_password}\" --role \"${admin_role_uuid}\"" $username caddyfile="/etc/caddy/Caddyfile" echo "cms.${domain_name} {" >> $caddyfile echo "reverse_proxy ${ip}:${port}" >> $caddyfile - echo "log file /home/val/caddy.log" >> $caddyfile echo "}" >> $caddyfile caddy fmt $caddyfile -w caddy reload -c $caddyfile