forked from vern/scripts
18 lines
351 B
Bash
Executable File
18 lines
351 B
Bash
Executable File
#!/usr/bin/env -S bash -e
|
|
|
|
[[ -z "$1" ]] && {
|
|
printf 'Usage: %s username\n' "$0"
|
|
exit 1
|
|
}
|
|
|
|
[[ -f "/var/tmp/register/$1" ]] || {
|
|
printf "Application from %s does not exist\n" "$1"
|
|
exit 2
|
|
}
|
|
|
|
read -rp "Deny $1's application? [y/N] "
|
|
[[ $REPLY =~ [Yy] ]] && {
|
|
rm -f "/var/tmp/register/$1"
|
|
echo "$1" >> "/var/tmp/users-denied-$(date -I)"
|
|
} || exit 3
|