From 7bfab1e0b3517ebae3068021a0db57554d79fd71 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 26 Dec 2023 23:40:45 +0100 Subject: [PATCH] fix SC2086 --- scripts/change_url | 4 ++-- scripts/install | 12 ++++++------ scripts/restore | 6 +++--- scripts/upgrade | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 5c25374..d63b767 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -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 diff --git a/scripts/install b/scripts/install index 915cf06..d1cbe89 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/restore b/scripts/restore index 4a2edb7..1d292df 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index df9debd..1061e28 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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