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

refactor(config): config.php is handle by ynh_add_config

This commit is contained in:
HugoPoi 2021-03-27 12:22:28 +01:00
parent 333a3981e5
commit 1c156f2d26
3 changed files with 3 additions and 7 deletions

View file

@ -247,8 +247,8 @@ ynh_replace_string --match_string="^DAEMON_CONF=$" --replace_string="&/etc/hosta
# isnt used ... instead the service is "pure systemd" ...
echo "DAEMON_CONF=/etc/hostapd/hostapd.conf" > /etc/default/hostapd
# Fix sources
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url}" --target_file="$final_path/config.php"
# Apply configuration
ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php"
# Set default inits
# The boot order of these services are important, so they are disabled by default
@ -263,7 +263,6 @@ systemctl unmask hostapd # On some system e.g. RPi, for some reason hostapd is m
ynh_script_progression --message="Storing the config file checksum..."
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/config.php"
ynh_store_file_checksum --file="/etc/init.d/hostapd"
#=================================================

View file

@ -162,10 +162,7 @@ ynh_replace_string --match_string="__PHPVERSION__" --replace_string="${phpversio
#=================================================
ynh_script_progression --message="Modifying a config file..."
ynh_backup_if_checksum_is_different --file="$final_path/config.php"
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url}" --target_file="$final_path/config.php"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/config.php"
ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php"
#=================================================
# SETUP SYSTEMD