README
This commit is contained in:
		
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
userrc
 | 
			
		||||
======
 | 
			
		||||
 | 
			
		||||
A very simple script that executes ~/.config/rc.local for your users.
 | 
			
		||||
 | 
			
		||||
    > ./userrc -h
 | 
			
		||||
    Usage: userrc [-c config] [-l logdir]
 | 
			
		||||
 | 
			
		||||
The script has two access modes: blacklist (default) and explicit.
 | 
			
		||||
In blacklist mode, it will find and execute rc.local for every user in the system except for the ones in the `users_deny` array.  
 | 
			
		||||
In expicit mode, it will find and execute rc.local for every user in the `users_allow` array.  
 | 
			
		||||
@@ -74,6 +74,8 @@ runtime_config() {
 | 
			
		||||
		case "$1" in
 | 
			
		||||
			(-c) config="$2"; shift;;
 | 
			
		||||
			(-l) logdir="$2"; shift;;
 | 
			
		||||
			(-h) usage; exit;;
 | 
			
		||||
			(*) usage; exit 1;;
 | 
			
		||||
		esac
 | 
			
		||||
		shift
 | 
			
		||||
	done
 | 
			
		||||
@@ -98,7 +100,7 @@ runtime_config() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main() {
 | 
			
		||||
	runtime_config
 | 
			
		||||
	runtime_config "$@"
 | 
			
		||||
	get_allowed_users
 | 
			
		||||
 | 
			
		||||
	for u in "${users[@]}"; do
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user