From c140cb6d8f8eb96d8604e5397a4cdc07e9739652 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 16 May 2016 11:43:04 -0400 Subject: [PATCH] example of setting up temp on a persistent big /localtmp drive with user name in path for uniquification. --- .../bashisms/bashrc_with_localtmp_code.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/bashisms/bashrc_with_localtmp_code.sh diff --git a/examples/bashisms/bashrc_with_localtmp_code.sh b/examples/bashisms/bashrc_with_localtmp_code.sh new file mode 100644 index 00000000..0df81b5e --- /dev/null +++ b/examples/bashisms/bashrc_with_localtmp_code.sh @@ -0,0 +1,19 @@ + +# snippet of code to set all the temp folders and genesis2 state dir on a stable local +# temporary directory. do not use /localtmp if it will be deleted! this stuff is +# expected to persist until the user decides to clean things up. + +# use a local temporary directory if possible. +if [ -d /localtmp ]; then + export FAST_LOCAL_STORAGE=/localtmp/$USER + export TMP=$FAST_LOCAL_STORAGE/tempo + mkdir -p $TMP &>/dev/null + chmod -R 700 $FAST_LOCAL_STORAGE + + # plan on putting the state directory onto there. + export GENII_USER_DIR=$FAST_LOCAL_STORAGE/state-dir +fi + +# after the above, load feisty meow scripts and they will take advantage of the +# TMP folder we set above. + -- 2.34.1