Ready for Jessie (+ some improvements)

This commit is contained in:
Julien VAUBOURG
2015-05-25 02:23:28 +02:00
parent f7187c4c43
commit e15fb76389
8 changed files with 62 additions and 61 deletions

View File

@@ -39,10 +39,10 @@ if [ "${ynh_version}" -lt 220 ]; then
exit 1
fi
sudo systemctl status dnsmasq status --quiet &> /dev/null
sudo systemctl is-active dnsmasq &> /dev/null
if [ $? -ne 0 ]; then
echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind && systemctl start dnsmasq)"
echo "ERROR: You need to enable dnsmasq instead of bind9 (apt-get remove bind9 && systemctl start dnsmasq)"
exit 1
fi
@@ -152,7 +152,6 @@ sudo install -o root -g root -m 0755 ../conf/iw_devices /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/iw_ssids /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/ipv6_expanded /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/ipv6_compressed /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/ynh-hotspot /usr/local/bin/
# Copy confs
sudo mkdir -pm 0755 /var/log/nginx/
@@ -192,7 +191,8 @@ sudo sed 's|<TPL:NGINX_REALPATH>|/var/www/wifiadmin/|g' -i /etc/php5/fpm/pool.d/
sudo sed "s|<TPL:NGINX_LOCATION>|${url_path}|g" -i /var/www/wifiadmin/config.php
# Copy init script
sudo install -o root -g root -m 0755 ../conf/ynh-hotspot.service /lib/systemd/system/ynh-hotspot.service
sudo install -o root -g root -m 0755 ../conf/ynh-hotspot /usr/local/bin/
sudo install -o root -g root -m 0644 ../conf/ynh-hotspot.service /etc/systemd/system/
# Update firewall for DHCP
sudo yunohost firewall allow --no-upnp --ipv6 UDP 547
@@ -201,15 +201,13 @@ sudo yunohost firewall allow --no-upnp UDP 67
# Set default inits
# The boot order of these services are important, so they are disabled by default
# and the ynh-hotspot service handles them.
# All services are registred by yunohost in order to prevent conflicts after the uninstall.
sudo yunohost service add hostapd
sudo yunohost service stop hostapd
sudo yunohost service disable hostapd
sudo systemctl disable hostapd
sudo systemctl stop hostapd
sudo yunohost service add php5-fpm
sudo yunohost service enable php5-fpm
sudo systemctl enable php5-fpm
sudo systemctl restart php5-fpm
sudo systemcld reload nginx
sudo systemctl reload nginx
# Remove IPv6 address set if there is a VPN installed
if [ "${ip6_addr}" != none ]; then
@@ -219,10 +217,8 @@ if [ "${ip6_addr}" != none ]; then
fi
fi
sudo yunohost service add ynh-hotspot
sudo yunohost service enable ynh-hotspot
sudo systemctl reenable ynh-hotspot
sudo systemcld start ynh-hotspot
sudo systemctl enable ynh-hotspot
sudo systemctl start ynh-hotspot
# Update SSO for wifiadmin
sudo yunohost app ssowatconf