remove 834 B

1234567891011121314151617181920212223242526272829
  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 packets
  20. # The yunohost policy is currently to not uninstall packets (dependency problems)
  21. ## sudo apt-get --assume-yes --force-yes remove hostapd radvd isc-dhcp-server iptables sipcalc wireless-tools
  22. exit 0