1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

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

@ -51,8 +51,8 @@
{ {
"name": "firmware_nonfree", "name": "firmware_nonfree",
"ask": { "ask": {
"en": "Install non-free firmwares for the wifi dongle (yes/no)", "en": "Install non-free firmwares - in addition to the free ones - for the wifi dongle (yes/no)",
"fr": "Installer des firmwares non-libres pour la clé USB wifi (yes/no)" "fr": "Installer des firmwares non-libres (en plus des libres) pour la clé USB wifi (yes/no)"
}, },
"example": "yes", "example": "yes",
"default": "yes" "default": "yes"

View file

@ -29,21 +29,8 @@ firmware_nonfree=${5}
if ! $upgrade; then if ! $upgrade; then
# Check YunoHost version source ./prerequisites
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
# 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

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_ssid=$(ynh_setting hotspot wifi_ssid)
wifi_passphrase=$(ynh_setting hotspot wifi_passphrase) wifi_passphrase=$(ynh_setting hotspot wifi_passphrase)
source ./prerequisites
if dpkg -l firmware-linux-nonfree &> /dev/null; then if dpkg -l firmware-linux-nonfree &> /dev/null; then
firmware_nonfree=yes firmware_nonfree=yes
else else

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-15 21:41+0200\n" "POT-Creation-Date: 2015-09-29 16:56+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,40 +17,40 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: sources/controller.php:199 #: sources/controller.php:188
msgid "All Wifi names must be unique"
msgstr ""
#: sources/controller.php:205
msgid "All IPv4 NAT prefixes must be unique"
msgstr ""
#: sources/controller.php:211
msgid "All IPv6 delegated prefixes must be unique"
msgstr ""
#: sources/controller.php:217
msgid "Your Wifi Hotspot needs a name and a password"
msgstr ""
#: sources/controller.php:221
msgid "Your password must from 8 to 63 characters (WPA2 passphrase)"
msgstr ""
#: sources/controller.php:225
msgid ""
"Only <LINK:ASCII>printable ASCII characters</LINK:ASCII> are permitted in "
"your password"
msgstr ""
#: sources/controller.php:234
msgid "You have to choose a wifi antenna interface" msgid "You have to choose a wifi antenna interface"
msgstr "" msgstr ""
#: sources/controller.php:237 #: sources/controller.php:191
msgid "The wifi antenna interface seems not exist on the system" msgid "The wifi antenna interface seems not exist on the system"
msgstr "" msgstr ""
#: sources/controller.php:207
msgid "All Wifi names must be unique"
msgstr ""
#: sources/controller.php:213
msgid "All IPv4 NAT prefixes must be unique"
msgstr ""
#: sources/controller.php:219
msgid "All IPv6 delegated prefixes must be unique"
msgstr ""
#: sources/controller.php:225
msgid "Your Wifi Hotspot needs a name and a password"
msgstr ""
#: sources/controller.php:229
msgid "Your password must from 8 to 63 characters (WPA2 passphrase)"
msgstr ""
#: sources/controller.php:233
msgid ""
"Only <LINK:ASCII>printable ASCII characters</LINK:ASCII> are permitted in "
"your password"
msgstr ""
#: sources/controller.php:244 #: sources/controller.php:244
msgid "The IPv6 Delegated Prefix format looks bad" msgid "The IPv6 Delegated Prefix format looks bad"
msgstr "" msgstr ""

View file

@ -150,7 +150,7 @@ div.tabs {
padding: 14px 14px 0 10px; padding: 14px 14px 0 10px;
} }
div.tabs a { ul.nav a {
outline: none; outline: none;
} }