another attempt to fix perms

This commit is contained in:
2026-07-03 11:44:22 +01:00
parent 2bc353c8fc
commit a611b5010f
+7 -8
View File
@@ -44,14 +44,12 @@ then
sudo adduser $(whoami) joeac.net sudo adduser $(whoami) joeac.net
fi fi
cd /home/joeac.net if ! [ -d /home/joeac.net/joeac.net/.git ]
if ! [ -d joeac.net/.git ]
then then
sudo -u joeac.net git clone https://git.joeac.net/joeac/joeac.net.git joeac.net sudo -u joeac.net git clone https://git.joeac.net/joeac/joeac.net.git /home/joeac.net/joeac.net
fi fi
sudo chown joeac.net:joeac.net joeac.net sudo chown joeac.net:joeac.net joeac.net
sudo chmod 765 joeac.net sudo chmod 765 /home/joeac.net/joeac.net
cd joeac.net
if ! [ -h /usr/local/lib/joeac.net ] if ! [ -h /usr/local/lib/joeac.net ]
then then
@@ -64,7 +62,7 @@ then
then then
read -sp "DIGITALOCEAN_TOKEN: " DIGITALOCEAN_TOKEN read -sp "DIGITALOCEAN_TOKEN: " DIGITALOCEAN_TOKEN
fi fi
echo ${DIGITALOCEAN_TOKEN} > DIGITALOCEAN_TOKEN echo ${DIGITALOCEAN_TOKEN} > /home/joeac.net/joeac.net/DIGITALOCEAN_TOKEN
fi fi
if ! ( podman secret exists remote_smtp_password ) if ! ( podman secret exists remote_smtp_password )
@@ -77,13 +75,14 @@ then
unset REMOTE_SMTP_PASSWORD unset REMOTE_SMTP_PASSWORD
fi fi
sudo -u joeac.net touch /home/joeac.net/joeac.net/.env
while read line while read line
do do
if expr "${line}" : "^[[:alnum:]_]\+=" 1>/dev/null if expr "${line}" : "^[[:alnum:]_]\+=" 1>/dev/null
then then
var_name="$(expr "${line}" "^\([[:alnum:]_]\+\)=")" var_name="$(expr "${line}" "^\([[:alnum:]_]\+\)=")"
if [ -n "$(grep "^${var_name}=" .env)" ] if [ -n "$(grep "^${var_name}=" /home/joeac.net/joeac.net/.env)" ]
then then
continue continue
fi fi
@@ -98,7 +97,7 @@ do
fi fi
fi fi
echo "${var_name}=${!var_name}" >> .env echo "${var_name}=${!var_name}" >> /home/joeac.net/joeac.net/.env
fi fi
done <example.env done <example.env