directus tmux et caddy 17
This commit is contained in:
parent
3c23283881
commit
bbcf3282aa
|
@ -279,14 +279,12 @@ if [[ "$answer" == "y" ]]; then
|
|||
su -c "cd /home/${username}/${cms_folder} &&\
|
||||
npx directus users create --email \"${directus_admin_email}\" \
|
||||
--password \"${directus_admin_password}\" --role \"${admin_role_uuid}\" &&\
|
||||
npx directus users create --email 'website' --password 'website' --role \"${website_role_uuid}\"" $username
|
||||
npx directus users create --email \"website@${domain_name}\" --password 'website' --role \"${website_role_uuid}\"" $username
|
||||
|
||||
website_token=$(head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \n')
|
||||
mariadb -u directus -p${db_directus_password} -e "UPDATE directus.directus_roles SET icon='robot' WHERE name='Website'";
|
||||
mariadb -u directus -p${db_directus_password} -e "UPDATE directus.directus_roles SET app_access='0' WHERE name='Website'";
|
||||
mariadb -u directus -p${db_directus_password} -e "UPDATE directus.directus_users SET token='${website_token}' WHERE email='website'";
|
||||
mariadb -u directus -p${db_directus_password} -e "UPDATE directus.directus_users SET password='NULL' WHERE email='website'";
|
||||
mariadb -u directus -p${db_directus_password} -e "UPDATE directus.directus_users SET email='NULL' WHERE email='website'";
|
||||
|
||||
caddyfile="/etc/caddy/Caddyfile"
|
||||
echo "cms.${domain_name} {" >> $caddyfile
|
||||
|
|
Loading…
Reference in New Issue