You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
543 B

  1. #!/bin/sh
  2. # do not override already existing user!!!
  3. uci show rpcd | grep -q wginstaller && exit 0
  4. # install wginstaller user with standard credentials
  5. # user: wginstaller
  6. # password: wginstaller
  7. uci add rpcd login
  8. uci set rpcd.@login[-1].username='wginstaller'
  9. password=$(uhttpd -m wginstaller)
  10. uci set rpcd.@login[-1].password="$password"
  11. uci add_list rpcd.@login[-1].read='wginstaller'
  12. uci add_list rpcd.@login[-1].write='wginstaller'
  13. uci commit rpcd
  14. # restart rpcd
  15. /etc/init.d/rpcd restart
  16. # restart uhttpd
  17. /etc/init.d/uhttpd restart