This commit is contained in:
Jack L. Frost 2015-08-17 13:46:09 +03:00
parent 6ef5f62d75
commit 530ba0d4f4
2 changed files with 14 additions and 1 deletions

11
README.md Normal file
View 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.

View File

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