mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
refactor: remove old ynh_normalize_url_path
better description remove ask for mandatory app install args needs_exposed_ports 547 67 for service add recommended User=root in service unit file
This commit is contained in:
parent
94d94648de
commit
bf890a9e27
6 changed files with 8 additions and 23 deletions
|
@ -1,10 +1,11 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=YunoHost Wifi Hotspot.
|
Description=YunoHost Wifi Hotspot
|
||||||
Requires=network.target
|
Requires=network.target
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
User=root
|
||||||
ExecStart=/usr/local/bin/ynh-hotspot start
|
ExecStart=/usr/local/bin/ynh-hotspot start
|
||||||
ExecStop=/usr/local/bin/ynh-hotspot stop
|
ExecStop=/usr/local/bin/ynh-hotspot stop
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"id": "hotspot",
|
"id": "hotspot",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Wifi Hotspot",
|
"en": "Create and manager wifi networks, share Internet access and use Yunohost apps accross wifi",
|
||||||
"fr": "Hotspot Wifi"
|
"fr": "Créer et configurer des réseaux wifi, partager l'accès a Internet et utiliser les applications Yunohost via wifi"
|
||||||
},
|
},
|
||||||
"url": "https://github.com/labriqueinternet/hotspot_ynh",
|
"url": "https://github.com/labriqueinternet/hotspot_ynh",
|
||||||
"version": "1.2.0~ynh3",
|
"version": "1.2.0~ynh3",
|
||||||
|
@ -27,20 +27,11 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain for the web administration",
|
|
||||||
"fr": "Choisissez un domaine pour l'administration web"
|
|
||||||
},
|
|
||||||
"example": "domain.org"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for the web administration",
|
|
||||||
"fr": "Choisissez un chemin pour l'administration web"
|
|
||||||
},
|
|
||||||
"example": "/wifiadmin",
|
|
||||||
"default": "/wifiadmin"
|
"default": "/wifiadmin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ function check_armbian_nonfree_conflict()
|
||||||
if dpkg --list | grep -q armbian-firmware; then
|
if dpkg --list | grep -q armbian-firmware; then
|
||||||
echo "You are running Armbian and firmware-misc-nonfree are known to conflict with armbian-firwmare. " >&2
|
echo "You are running Armbian and firmware-misc-nonfree are known to conflict with armbian-firwmare. " >&2
|
||||||
echo "The package firmware-misc-nonfree is a dependency of firmware-ralink, so firmware-ralink will NOT be installed" >&2
|
echo "The package firmware-misc-nonfree is a dependency of firmware-ralink, so firmware-ralink will NOT be installed" >&2
|
||||||
echo "You can manually install firmware-ralink with 'sudo apt -o Dpkg::Options::=\"--force-overwrite\" firmware-ralink'" >&2
|
echo "You can manually install firmware-ralink with 'apt -o Dpkg::Options::=\"--force-overwrite\" firmware-ralink'" >&2
|
||||||
nonfree_firmware_packages=$(echo $nonfree_firmware_packages | sed 's/ firmware-ralink//')
|
nonfree_firmware_packages=$(echo $nonfree_firmware_packages | sed 's/ firmware-ralink//')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd"
|
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd" --needs_exposed_ports 547 67
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -133,7 +133,7 @@ systemctl enable $service_name.service --quiet
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd"
|
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd" --needs_exposed_ports 547 67
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -80,13 +80,6 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK THE PATH
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Normalize the URL path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path --path_url=$path_url)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -199,7 +192,7 @@ find ${final_path}/ -type d -exec chmod +x {} \;
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd"
|
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd" --needs_exposed_ports 547 67
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue