Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$#" -ne 3 ]; then
  6. printf '%b\n' "\033[1m$0\033[0m \033[4muser\033[0m \033[4mhost\033[0m \033[4mpassword\033[0m"
  7. exit 1
  8. fi
  9.  
  10. user=$1
  11. host=$2
  12. password=$3
  13.  
  14. /usr/sbin/ejabberdctl register "$user" "$host" "$password"
  15. printf "$user:$(printf $(echo -n $user:$host:$password | md5sum)):$host:authorized\n" >> /etc/reTurn/users.txt
  16. /bin/systemctl reload resiprocate-turn-server.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement