Coding-Style; First floor and basement are now the same with the
authentication user
This commit is contained in:
parent
aadce7fb1a
commit
aacb9c9669
@ -49,35 +49,12 @@ rm -f ${temp_outfile}
|
||||
for appendix in open close door
|
||||
do
|
||||
action="$appendix"
|
||||
if [ "$action" = "door" ]
|
||||
then
|
||||
action=""
|
||||
fi
|
||||
|
||||
export action
|
||||
|
||||
outfile="${dest}/authorized_keys.${appendix}"
|
||||
cat ${temp_outfile} |envsubst > ${outfile}
|
||||
|
||||
# Oben
|
||||
if [ "$(hostname)" = "foodoor" ]; then
|
||||
# Oben und unten
|
||||
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 [ "$(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
|
||||
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user