more gemini fixes

This commit is contained in:
Arya 2023-02-27 19:21:03 +05:30
parent 6899c6dd19
commit d67b330b00
Signed by: arya
GPG Key ID: 842D12BDA50DF120

View File

@ -18,7 +18,8 @@ chown -R {{username}}:{{username}} /home/{{username}}/.ssh
sed -i 's/REPLACEME/{{username}}/g' /home/{{username}}/{meta-info.toml,Caddyfile}
loginctl enable-linger {{username}}
mkdir /var/gemini/p.projectsegfau.lt/users/{{username}} && ln -s /var/gemini/p.projectsegfau.lt/users/{{username}} /home/{{username}}/public_gemini
chown -R {{username}}:{{username}} /var/gemini/p.projectsegfau.lt/users/{{username}}
chmod 755 /var/gemini/p.projectsegfau.lt/users/{{username}}
chown -R {{username}}:{{username}} /var/gemini/p.projectsegfau.lt/users/{{username}} /home/{{username}}/public_gemini
setquota -u {{username}} 20G 20G 0 0 /
a=$(curl -X POST "https://auth.p.projectsegfau.lt/api/v3/core/users/" -H "accept: application/json" -H "content-type: application/json" -H "Authorization: Bearer $(</root/pass/authentiktoken)" -d '{"username":"{{username}}","name":"{{username}}","is_active":true,"groups":["57fe5750-5ac6-46ff-95bc-298cbff0b340"],"email":"{{email}}","attributes":{},"path":"users"}')
pk=$(echo $a | jq '.pk')