sifre_olustur.sh 206 B

12345678
  1. #!/bin/sh
  2. if [ $1 ];then
  3. sudo sh -c "echo -n '$1:' >> /etc/nginx/.htpasswd"
  4. sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"
  5. else
  6. sudo cat /etc/shadow | grep `whoami` >> /etc/nginx/.htpasswd
  7. fi