#!/bin/bash # Path: /var/publapi/users/{{username}}.sh # This file is generated by PublAPI. Do not edit this file. echo "E-Mail of {{username}} is {{email}}." pass="$(tr -dc A-Za-z0-9 /home/{{username}}/pass chmod 600 /home/{{username}}/pass chown {{username}}:{{username}} /home/{{username}}/pass usermod -aG users {{username}} mkdir /home/{{username}}/.ssh echo "{{sshkey}}" > /home/{{username}}/.ssh/authorized_keys chmod 700 /home/{{username}}/.ssh chmod 600 /home/{{username}}/.ssh/authorized_keys 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 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}} 10G 12G 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 $(