README
This commit is contained in:
parent
6ef5f62d75
commit
530ba0d4f4
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
|
case "$1" in
|
||||||
(-c) config="$2"; shift;;
|
(-c) config="$2"; shift;;
|
||||||
(-l) logdir="$2"; shift;;
|
(-l) logdir="$2"; shift;;
|
||||||
|
(-h) usage; exit;;
|
||||||
|
(*) usage; exit 1;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
@ -98,7 +100,7 @@ runtime_config() {
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
runtime_config
|
runtime_config "$@"
|
||||||
get_allowed_users
|
get_allowed_users
|
||||||
|
|
||||||
for u in "${users[@]}"; do
|
for u in "${users[@]}"; do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user