[tor-commits] [guardfraction/master] Make statedir if it does not exist

asn at torproject.org asn at torproject.org
Tue Feb 24 13:45:03 UTC 2015


commit 0dd2b64863982a475e717accc23394dfcd79a1c3
Author: Peter Palfrader <peter at palfrader.org>
Date:   Wed Feb 4 16:53:36 2015 +0100

    Make statedir if it does not exist
---
 guardfraction_cron.sh |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guardfraction_cron.sh b/guardfraction_cron.sh
index bcea7c4..f133161 100755
--- a/guardfraction_cron.sh
+++ b/guardfraction_cron.sh
@@ -16,6 +16,10 @@ STATE_DIR="$GUARDFRACTION_SRC/var"
 
 DAYS_WORTH=90
 
+if ! [ -d "$STATE_DIR" ]; then
+        mkdir "$STATE_DIR"
+fi
+
 # Where the guardfraction output file should be placed.
 GUARDFRACTION_OUTPUT_FILE="$STATE_DIR/guardfraction.output"
 





More information about the tor-commits mailing list