1
0
forked from NASP/registry

bug fix (Fri Apr 21 17:23:03 CST 2023)

This commit is contained in:
Dict Xiong 2023-04-21 17:23:04 +08:00
parent cce4a4c5bc
commit 9fa560e5c2
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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