forked from NASP/registry
jumpserver_deploy.sh init
This commit is contained in:
parent
7069fdbd72
commit
310dac2125
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||||
|
|
||||||
|
tmp_path="/tmp/authorized_keys"
|
||||||
|
dest_path="/home/ssh/.ssh/authorized_keys"
|
||||||
|
echo "# This file is autoly generated. Changes here will not work." > "$tmp_path"
|
||||||
|
|
||||||
|
for file in $(find "$THIS_DIR/../authorized_keys" -type f); do
|
||||||
|
(cat "$file"; echo) >> "$tmp_path"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat "$tmp_path" > "$dest_path"
|
||||||
|
rm "$tmp_path"
|
Loading…
Reference in New Issue
Block a user