1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00
hotspot_ynh/scripts/prerequisites
2015-09-29 18:01:10 +02:00

16 lines
456 B
Text

# Source me
# Check YunoHost version (dnsmasq)
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" >&2
exit 1
fi
sudo systemctl is-active dnsmasq &> /dev/null
if [ $? -ne 0 ]; then
echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind9 && systemctl start dnsmasq)" >&2
exit 1
fi