17 lines
397 B
Bash
Executable File
17 lines
397 B
Bash
Executable File
#!/bin/sh
|
|
|
|
run_user=$(id -u)
|
|
if [ "$run_user" -eq 0 ] || [ "$run_user" -eq 1000 ]; then
|
|
if [ -f "$1" ]; then
|
|
for u in $(members users); do
|
|
if [ "$u" != "anonhmmst" ]; then
|
|
sed -e "s/USERNAME/${u}/g" "$1" | sendmail "$u"
|
|
fi
|
|
done
|
|
else
|
|
printf "Filename of email required.\\n"
|
|
fi
|
|
else
|
|
printf "This script really isn't meant for users. You cannot use it.\\n"
|
|
fi
|