diff --git a/scripts/jumpserver_deploy.sh b/scripts/jumpserver_deploy.sh index 5fe22c8..0f4ee0c 100755 --- a/scripts/jumpserver_deploy.sh +++ b/scripts/jumpserver_deploy.sh @@ -20,4 +20,4 @@ insert_if_not_exist() insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh" -\"$THIS_DIR\"/jumpserver_cron.sh +"$THIS_DIR"/jumpserver_cron.sh diff --git a/scripts/testbed_cron.sh b/scripts/testbed_cron.sh index b061946..ed2f833 100755 --- a/scripts/testbed_cron.sh +++ b/scripts/testbed_cron.sh @@ -7,7 +7,7 @@ touch_user() { if id -u $1 1>/dev/null 2>&1; then return fi - if ! id -g nasp 1>/dev/null 2>&1; then + if ! getent group nasp ; then echo "Group 'nasp' does not exist\!" exit 1 fi @@ -43,7 +43,7 @@ update_key() { } main() { - cp "$THIS_DIR/nasp /etc/sudoers.d/nasp" + cp "$THIS_DIR/nasp" "/etc/sudoers.d/nasp" for file in "$THIS_DIR"/../authorized_keys/* ; do if [[ ! -d "$file" ]]; then continue diff --git a/scripts/testbed_deploy.sh b/scripts/testbed_deploy.sh index ed75701..1a77072 100755 --- a/scripts/testbed_deploy.sh +++ b/scripts/testbed_deploy.sh @@ -17,4 +17,4 @@ insert_if_not_exist() insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/testbed_cron.sh" -\"$THIS_DIR\"/testbed_cron.sh +"$THIS_DIR"/testbed_cron.sh