From 00f9884c10115786dc16496cb5b6c5a3170cb9b9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 29 Dec 2023 13:33:02 +0100 Subject: [PATCH] Update 99-run.sh --- .../rootfs/etc/cont-init.d/99-run.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/transmission_openvpn/rootfs/etc/cont-init.d/99-run.sh b/transmission_openvpn/rootfs/etc/cont-init.d/99-run.sh index 44970e178..6da4325ac 100755 --- a/transmission_openvpn/rootfs/etc/cont-init.d/99-run.sh +++ b/transmission_openvpn/rootfs/etc/cont-init.d/99-run.sh @@ -75,6 +75,14 @@ function check_path () { # Get variable file="$1" + # Double check exists + if [ !-f "$file" ]; then + bashio::warning "$file not found" + return 1 + fi + + cp "$file" "$file2" + # Loop through each line of the input file while read line do @@ -97,7 +105,9 @@ function check_path () { fi fi fi - done < "$file" + done < "$file2" + + rm "$file2" }