Automatisches foo
This commit is contained in:
parent
3f59acbfb0
commit
a104fbf913
@ -58,18 +58,26 @@ do
|
||||
outfile="${dest}/authorized_keys.${appendix}"
|
||||
cat ${temp_outfile} |envsubst > ${outfile}
|
||||
|
||||
# Oben
|
||||
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
|
||||
|
||||
# Oben
|
||||
if [ "$(hostname)" = "foodoor" ]; 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
|
||||
|
||||
# Unten
|
||||
#if [ "${action}" = "open" ]; then
|
||||
# owner="unlock"
|
||||
#elif [ "${action}" = "close" ]; then
|
||||
# owner="lock"
|
||||
#fi
|
||||
if [ "$(hostname)" = "kellertuer" ]; then
|
||||
if [ "${action}" = "open" ]; then
|
||||
owner="unlock"
|
||||
elif [ "${action}" = "close" ]; then
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user