1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

fix SC2086

This commit is contained in:
OniriCorpe 2023-12-26 23:40:45 +01:00
parent f198af5425
commit 7bfab1e0b3
4 changed files with 16 additions and 16 deletions

View file

@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
@ -32,7 +32,7 @@ ynh_change_url_nginx_config
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
#=================================================
# END OF SCRIPT

View file

@ -28,7 +28,7 @@ else
ynh_exec_warn_less yunohost firewall reload
fi
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
ynh_app_setting_set --app="$app" --key=dns_over_https --value="$dns_over_https"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -36,12 +36,12 @@ ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$install_dir
ynh_setup_source --dest_dir="$install_dir "
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
chown -R "$app:$app" "$install_dir"
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' $install_dir/AdGuardHome
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' "$install_dir/AdGuardHome"
#=================================================
# NGINX CONFIGURATION
@ -114,7 +114,7 @@ ynh_app_setting_set --app="$app" --key=password --value="$password"
ynh_add_config --template="../conf/AdGuardHome.yaml" --destination="$install_dir/AdGuardHome.yaml"
chmod 600 "$install_dir/AdGuardHome.yaml"
chown -R $app:$app "$install_dir/AdGuardHome.yaml"
chown -R "$app:$app" "$install_dir/AdGuardHome.yaml"
#=================================================
# SETUP SYSTEMD
@ -124,7 +124,7 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Ads & trackers blocking DNS server" --needs_exposed_ports $port_adguard $port_dns_over_http $port_dns_over_quic
yunohost service add "$app" --description="Ads & trackers blocking DNS server" --needs_exposed_ports "$port_adguard" "$port_dns_over_http" "$port_dns_over_quic"
#=================================================
# START SYSTEMD SERVICE

View file

@ -39,9 +39,9 @@ ynh_restore_file --origin_path="$install_dir"
# this will be treated as a security issue.
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
chown -R "$app:$app" "$install_dir"
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' $install_dir/AdGuardHome
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' "$install_dir/AdGuardHome"
ynh_restore_file --origin_path="/etc/dnsmasq.d/$app"
@ -57,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet
yunohost service add $app --description="Ads & trackers blocking DNS server" --needs_exposed_ports $port_adguard $port_dns_over_http $port_dns_over_quic
yunohost service add "$app" --description="Ads & trackers blocking DNS server" --needs_exposed_ports "$port_adguard" "$port_dns_over_http" "$port_dns_over_quic"
#=================================================
# START SYSTEMD SERVICE

View file

@ -55,13 +55,13 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$install_dir
ynh_setup_source --dest_dir="$install_dir "
fi
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
chown -R "$app:$app" "$install_dir"
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' $install_dir/AdGuardHome
setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' "$install_dir/AdGuardHome"
#=================================================
# NGINX CONFIGURATION
@ -74,7 +74,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Ads & trackers blocking DNS server" --needs_exposed_ports $port_adguard $port_dns_over_http $port_dns_over_quic
yunohost service add "$app" --description="Ads & trackers blocking DNS server" --needs_exposed_ports "$port_adguard" "$port_dns_over_http" "$port_dns_over_quic"
#=================================================
# SPECIFIC UPGRADE
@ -156,7 +156,7 @@ if need_file_update:
"
chmod 600 "$install_dir/AdGuardHome.yaml"
chown -R $app:$app "$install_dir/AdGuardHome.yaml"
chown -R "$app:$app" "$install_dir/AdGuardHome.yaml"
#=================================================
# START SYSTEMD SERVICE