move all steps to functions #7

Merged
v0id1st merged 6 commits from editor into main 2026-06-23 00:52:03 +02:00
Showing only changes of commit bb253b3700 - Show all commits

View File

@@ -92,14 +92,14 @@ echo "+cpu +memory" > "$CG_ROOT/cgroup.subtree_control" 2>/dev/null || true
USER_CG="$CG_ROOT/$LOGIN" USER_CG="$CG_ROOT/$LOGIN"
mkdir "$USER_CG" mkdir "$USER_CG"
mkdir -p /home/$LOGIN/.ssh mkdir -p "/home/$LOGIN/.ssh"
mkdir -p /home/$LOGIN/.gnupg mkdir -p "/home/$LOGIN/.gnupg"
touch /home/$LOGIN/public_html/.webring touch "/home/$LOGIN/public_html/.webring"
chmod 0700 /home/$LOGIN/.ssh chmod 0700 "/home/$LOGIN/.ssh"
chmod 0700 /home/$LOGIN/.gnupg chmod 0700 "/home/$LOGIN/.gnupg"
chown -R $LOGIN:$LOGIN /home/$LOGIN/ chown -R "$LOGIN":"$LOGIN" "/home/$LOGIN/"
curl -X POST https://cloud.tylda.org/ocs/v1.php/cloud/users -d userid="$LOGIN" -d password="$PASS" -H "OCS-APIRequest: true" -u "$NEXTCLOUD_USER:$NEXTCLOUD_PASS" curl -X POST https://cloud.tylda.org/ocs/v1.php/cloud/users -d userid="$LOGIN" -d password="$PASS" -H "OCS-APIRequest: true" -u "$NEXTCLOUD_USER:$NEXTCLOUD_PASS"
curl -X PUT "https://cloud.tylda.org/ocs/v1.php/cloud/users/$LOGIN" -H "OCS-APIRequest: true" -u "$NEXTCLOUD_USER:$NEXTCLOUD_PASS" -d key="quota" -d value="250MB" curl -X PUT "https://cloud.tylda.org/ocs/v1.php/cloud/users/$LOGIN" -H "OCS-APIRequest: true" -u "$NEXTCLOUD_USER:$NEXTCLOUD_PASS" -d key="quota" -d value="250MB"
@@ -109,7 +109,7 @@ cp welcome_tmp.txt welcome.txt
echo "Login: $LOGIN" >> welcome.txt echo "Login: $LOGIN" >> welcome.txt
echo "Hasło: $PASS" >> welcome.txt echo "Hasło: $PASS" >> welcome.txt
sendmail -f v0id1st@tylda.org $LOGIN@tylda.org < welcome.txt sendmail -f v0id1st@tylda.org "$LOGIN@tylda.org" < welcome.txt
rm -f welcome.txt rm -f welcome.txt