forked from NASP/registry
		
	bug fix (Fri Apr 21 17:23:03 CST 2023)
This commit is contained in:
		
							parent
							
								
									cce4a4c5bc
								
							
						
					
					
						commit
						9fa560e5c2
					
				@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user