mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
24 lines
614 B
Bash
24 lines
614 B
Bash
#!/bin/bash
|
|
|
|
yunohost_setting() {
|
|
grep "^${1}:" "/etc/yunohost/apps/hotspot/settings.yml" | sed s/^[^:]\\+:\\s*[\"\']\\?// | sed s/\\s*[\"\']\$//
|
|
}
|
|
|
|
domain=$(yunohost_setting domain)
|
|
path=$(yunohost_setting path)
|
|
wifi_ssid=$(yunohost_setting wifi_ssid)
|
|
wifi_passphrase=$(yunohost_setting wifi_passphrase)
|
|
|
|
if dpkg -l firmware-linux-nonfree &> /dev/null; then
|
|
firmware_nonfree=yes
|
|
else
|
|
firmware_nonfree=no
|
|
fi
|
|
|
|
export HOTSPOT_UPGRADE=1
|
|
/etc/yunohost/apps/hotspot/scripts/remove
|
|
./install "${domain}" "${path}" "${wifi_ssid}" "${wifi_passphrase}" "${firmware_nonfree}"
|
|
|
|
sudo systemctl start ynh-hotspot
|
|
|
|
exit 0
|