From aa19095643577256090312439ae1a90614774fd2 Mon Sep 17 00:00:00 2001 From: ir20 <60230695+ir20@users.noreply.github.com> Date: Wed, 7 Jul 2021 22:37:47 +0800 Subject: [PATCH] supress error output supress error message "rm: cannot remove '/etc/systemd/system/v2ray.service.d/10-donot_touch_multi_conf.conf': No such file or directory" --- install-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-release.sh b/install-release.sh index 9530a99..c7fc176 100644 --- a/install-release.sh +++ b/install-release.sh @@ -372,7 +372,7 @@ install_startup_service_file() { mkdir -p '/etc/systemd/system/v2ray.service.d' mkdir -p '/etc/systemd/system/v2ray@.service.d/' if [[ -n "$JSONS_PATH" ]]; then - "rm" '/etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf' \ + "rm" "-f" '/etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf' \ '/etc/systemd/system/v2ray@.service.d/10-donot_touch_single_conf.conf' echo "# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there. # Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html @@ -382,7 +382,7 @@ ExecStart=/usr/local/bin/v2ray -confdir $JSONS_PATH" | tee '/etc/systemd/system/v2ray.service.d/10-donot_touch_multi_conf.conf' > \ '/etc/systemd/system/v2ray@.service.d/10-donot_touch_multi_conf.conf' else - "rm" '/etc/systemd/system/v2ray.service.d/10-donot_touch_multi_conf.conf' \ + "rm" "-f" '/etc/systemd/system/v2ray.service.d/10-donot_touch_multi_conf.conf' \ '/etc/systemd/system/v2ray@.service.d/10-donot_touch_multi_conf.conf' echo "# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there. # Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html