Initial commit
This commit is contained in:
27
rootfs/overlay/usr/libexec/copy-var.sh
Executable file
27
rootfs/overlay/usr/libexec/copy-var.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cleanup() {
|
||||
if [ -n "${tmpdir}" ] && [ -d "${tmpdir}" ] && [ / != "${tmpdir}" ]; then
|
||||
if mountpoint -q "${tmpdir}"; then
|
||||
umount "${tmpdir}"
|
||||
fi
|
||||
rm -rf "${tmpdir}"
|
||||
fi
|
||||
unset tmpdir
|
||||
}
|
||||
|
||||
if ! mountpoint -q /var; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tmpdir=$(TMPDIR=/run mktemp -d)
|
||||
trap cleanup INT QUIT TERM EXIT
|
||||
|
||||
mount -o bind / "${tmpdir}"
|
||||
cp -a "${tmpdir}"/var/. /var/
|
||||
|
||||
if [ -x "$(command -v selinuxenabled)" ] && selinuxenabled; then
|
||||
restorecon -RF /var
|
||||
fi
|
||||
6
rootfs/overlay/usr/libexec/ssh-authorized-keys
Executable file
6
rootfs/overlay/usr/libexec/ssh-authorized-keys
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
USER="${1}"
|
||||
KEYTYPE="${2}"
|
||||
|
||||
curl -gs http://sshkeys.pyrocufflink.blue/"${USER}"/"${KEYTYPE}".pub
|
||||
Reference in New Issue
Block a user