Automatisches foo

This commit is contained in:
Bandie 2021-11-07 19:45:39 +01:00
parent 3f59acbfb0
commit a104fbf913

View File

@ -58,18 +58,26 @@ do
outfile="${dest}/authorized_keys.${appendix}" outfile="${dest}/authorized_keys.${appendix}"
cat ${temp_outfile} |envsubst > ${outfile} cat ${temp_outfile} |envsubst > ${outfile}
# Oben # Oben
install -d -o ${appendix} -g nogroup -m 0700 /var/lib/foodoor/${appendix}/.ssh if [ "$(hostname)" = "foodoor" ]; then
install -b -S .last -o ${appendix} -g nogroup -m 0600 ${outfile} /var/lib/foodoor/${appendix}/.ssh/authorized_keys install -d -o ${appendix} -g nogroup -m 0700 /var/lib/foodoor/${appendix}/.ssh
install -b -S .last -o ${appendix} -g nogroup -m 0600 ${outfile} /var/lib/foodoor/${appendix}/.ssh/authorized_keys
fi
# Unten # Unten
#if [ "${action}" = "open" ]; then if [ "$(hostname)" = "kellertuer" ]; then
# owner="unlock" if [ "${action}" = "open" ]; then
#elif [ "${action}" = "close" ]; then owner="unlock"
# owner="lock" elif [ "${action}" = "close" ]; then
#fi owner="lock"
fi
install -d -o ${owner} -g nogroup -m 0700 /var/lib/foodoor/${action}/.ssh
install -b -S .last -o ${owner} -g nogroup -m 0600 ${outfile} /var/lib/foodoor/${action}/.ssh/authorized_keys
if [ "${appendix}" = "door" ]; then
install -d -o ${appendix} -g nogroup -m 0700 /var/lib/foodoor/${appendix}/.ssh
install -b -S .last -o ${appendix} -g nogroup -m 0600 ${outfile} /var/lib/foodoor/${appendix}/.ssh/authorized_keys
fi
fi
#install -d -o ${owner} -g nogroup -m 0700 /var/lib/foodoor/${action}/.ssh
#install -b -S .last -o ${owner} -g nogroup -m 0600 ${outfile} /var/lib/foodoor/${action}/.ssh/authorized_keys
done done