Mercurial > prosody-modules
comparison mod_auth_external/examples/bash/prosody-auth-example.sh @ 1197:25641c4cab36
mod_auth_external/examples: bash: Don't use log file by default
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 26 Sep 2013 18:10:41 +0100 |
| parents | b6280e8886f4 |
| children |
comparison
equal
deleted
inserted
replaced
| 1196:f45ca6edc159 | 1197:25641c4cab36 |
|---|---|
| 2 | 2 |
| 3 IFS=":" | 3 IFS=":" |
| 4 AUTH_OK=1 | 4 AUTH_OK=1 |
| 5 AUTH_FAILED=0 | 5 AUTH_FAILED=0 |
| 6 LOGFILE="/var/log/prosody/auth.log" | 6 LOGFILE="/var/log/prosody/auth.log" |
| 7 USELOG=true | 7 USELOG=false |
| 8 | 8 |
| 9 while read ACTION USER HOST PASS ; do | 9 while read ACTION USER HOST PASS ; do |
| 10 | 10 |
| 11 [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST Pass: $PASS" >> $LOGFILE; } | 11 [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST Pass: $PASS" >> $LOGFILE; } |
| 12 | 12 |
