summarylogtreecommitdiffstats
path: root/linux-wifi-hotspot.install
blob: d569c5bb6a2e6988822125c16afd67a155d1b63f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_install() {
  # Execute create_ap without asking for a password
  echo "ALL ALL=NOPASSWD: /usr/bin/create_ap" | (sudo su -c 'EDITOR="tee -a" visudo -f /etc/sudoers.d/create_ap')

  echo ""
  echo "Start the hotspot service on startup (using your saved configuration) with:"
  echo "systemctl enable create_ap"
  echo ""
}

post_remove() {
  sudo rm /etc/sudoers.d/create_ap

  echo ""
  echo "Optionally remove config file:"
  echo "sudo rm /etc/wh.config"
  echo ""
}