diff options
| -rwxr-xr-x | remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys b/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys index 08ad7d2c..9a64b83a 100755 --- a/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys +++ b/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys @@ -4,7 +4,9 @@ AUTH_KEYS_DIR="/root/.ssh/authorized_keys.d/" AUTH_KEYS_FILE="/root/.ssh/authorized_keys" # do we even have the directory? -[ ! -d "$AUTH_KEYS_DIR" ] && echo "No such directory: $AUTH_KEYS_DIR" && exit 1 +[ ! -d "$AUTH_KEYS_DIR" ] && echo "No such directory: $AUTH_KEYS_DIR" && exit 0 + +mkdir -m 700 $(dirname "$AUTH_KEYS_FILE") 2>/dev/null # ok, lets cat them in the real file for KEY in "$AUTH_KEYS_DIR"/* ; do |
