Clean prerequisites and fix css outline for tabs

This commit is contained in:
Julien Vaubourg
2015-09-29 18:01:10 +02:00
parent 4ca40efb43
commit 6fd4b34055
6 changed files with 52 additions and 47 deletions

View File

@@ -29,21 +29,8 @@ firmware_nonfree=${5}
if ! $upgrade; then
# 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" >&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
source ./prerequisites
# Check arguments
if [ -z "${wifi_ssid}" -o -z "${wifi_passphrase}" ]; then
echo "ERROR: Your Wifi Hotspot needs a name and a password" >&2

16
scripts/prerequisites Normal file
View File

@@ -0,0 +1,16 @@
# 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

View File

@@ -12,6 +12,8 @@ path=$(ynh_setting hotspot path)
wifi_ssid=$(ynh_setting hotspot wifi_ssid)
wifi_passphrase=$(ynh_setting hotspot wifi_passphrase)
source ./prerequisites
if dpkg -l firmware-linux-nonfree &> /dev/null; then
firmware_nonfree=yes
else