mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
Check yunohost version
This commit is contained in:
parent
dbc7b089b0
commit
3ee2fbbc88
1 changed files with 15 additions and 0 deletions
|
@ -31,6 +31,21 @@ firmware_nonfree=${5}
|
||||||
#
|
#
|
||||||
#ip6_net=${6}
|
#ip6_net=${6}
|
||||||
|
|
||||||
|
# Check YunoHost version
|
||||||
|
ynh_version=$(sudo dpkg -l yunohost | grep ii | awk '{ print $3 }' | sed 's/\.//g')
|
||||||
|
|
||||||
|
if [ "${ynh_version}" -lt 220 ]; then
|
||||||
|
echo "ERROR: You need a YunoHost version equals or greater than 2.2.0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo service dnsmasq status &> /dev/null
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind9 && service dnsmasq start)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Check arguments
|
# Check arguments
|
||||||
if [ -z "${wifi_ssid}" -o -z "${wifi_passphrase}" ]; then
|
if [ -z "${wifi_ssid}" -o -z "${wifi_passphrase}" ]; then
|
||||||
echo "ERROR: Your Wifi Hotspot needs a name and a password" >&2
|
echo "ERROR: Your Wifi Hotspot needs a name and a password" >&2
|
||||||
|
|
Loading…
Reference in a new issue