remove 923 B

123456789101112131415161718192021222324252627282930313233
  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. # Remove confs
  10. sudo rm -f /etc/hostapd/hostapd.conf{.tpl,} /etc/radvd.conf{.tpl,} /etc/dhcp/dhcpd.conf{.tpl,}
  11. sudo rm -f /etc/nginx/conf.d/${domain}.d/wifiadmin.conf
  12. sudo rm -f /etc/php5/fpm/pool.d/wifiadmin.conf
  13. # Restart services
  14. sudo yunohost service stop php5-fpm
  15. sudo yunohost service start php5-fpm
  16. sudo service nginx reload
  17. # Remove sources
  18. sudo rm -rf /var/www/wifiadmin/
  19. # Remove user
  20. sudo userdel -f wifiadmin
  21. # Remove packets
  22. # The yunohost policy is currently to not uninstall packets (dependency problems)
  23. ## sudo apt-get --assume-yes --force-yes remove hostapd radvd isc-dhcp-server iptables
  24. ## sudo apt-get --assume-yes --force-yes remove sipcalc wireless-tools
  25. exit 0