remove 958 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # Retrieve arguments
  3. domain=$(sudo yunohost app setting hotspot domain)
  4. # The End
  5. sudo service ynh-hotspot stop
  6. sudo yunohost service remove ynh-hotspot
  7. sudo rm -f /etc/init.d/ynh-hotspot
  8. sudo rm -f /tmp/.ynh-hotspot-*
  9. # Update firewall for DHCP
  10. sudo yunohost firewall disallow --ipv6 UDP 547
  11. sudo yunohost firewall disallow UDP 67
  12. # Remove confs
  13. sudo rm -fr /etc/dnsmasq.d.tpl/
  14. sudo rm -f /etc/hostapd/hostapd.conf{.tpl,} /etc/radvd.conf{.tpl,} /etc/dhcp/dhcpd.conf{.tpl,}
  15. sudo rm -f /etc/nginx/conf.d/${domain}.d/wifiadmin.conf
  16. sudo rm -f /etc/php5/fpm/pool.d/wifiadmin.conf
  17. # Restart services
  18. sudo yunohost service stop php5-fpm
  19. sudo yunohost service start php5-fpm
  20. sudo service nginx reload
  21. # Remove sources
  22. sudo rm -rf /var/www/wifiadmin/
  23. # Remove packets
  24. # The yunohost policy is currently to not uninstall packets (dependency problems)
  25. ## sudo apt-get --assume-yes --force-yes remove hostapd iptables sipcalc wireless-tools
  26. exit 0