diff options
author | Christian Rößler | 2015-08-10 15:50:31 +0200 |
---|---|---|
committer | Christian Rößler | 2015-08-10 15:50:31 +0200 |
commit | dbf55f9e799a0ef1be4030bc8ae8520c8a1a41c9 (patch) | |
tree | fac4ed7f14d0c221fadee00fad1c3040ce5207f3 /remote | |
parent | [server] do not allow login of disabled accounts :) (diff) | |
download | tm-scripts-dbf55f9e799a0ef1be4030bc8ae8520c8a1a41c9.tar.gz tm-scripts-dbf55f9e799a0ef1be4030bc8ae8520c8a1a41c9.tar.xz tm-scripts-dbf55f9e799a0ef1be4030bc8ae8520c8a1a41c9.zip |
[ssh-auth-keys] Modified systemd-ssh_auth_keys to not exit when missing AUTH_KEYS_DIR,
also mkdir onto $AUTH_KEYS_FILE's directory.
Diffstat (limited to 'remote')
-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 |