0
0
1
| 1 | #!/bin/bash |
| 2 | VERSION='1.0' |
| 3 | |
| 4 | generate_password() { |
| 5 | openssl rand -base64 12 | tr -d '/+' | cut -c1-16 |
| 6 | } |
| 7 | |
| 8 | user_exists() { |
| 9 | grep -q "^$1:" .htpasswd 2>/dev/null || grep -q "^$1 / " .htpasswd.txt 2>/dev/null |
| 10 | } |