Added the local-cache to avoiding the permission problem in /tmp
This commit is contained in:
@@ -24,8 +24,9 @@ colorize() {
|
||||
function dashboard_fast() {
|
||||
#### CHANGABLE OPTIONS ####
|
||||
ISTHISVM=0 # Change to 1 if this is a VM. This will remove the temperature bit.
|
||||
MIN_CHECK_IP=30 # Change this value to set the timing cache for checking the public IP
|
||||
MIN_CHECK_IP=30 # Change this value to set the timing cache for checking the public IP.
|
||||
MIN_CHECK_UPDATE=120 # Change this value to set the timing cache for checking updates.
|
||||
LOCAL_CACHE=1 # Change this value to 1 if you want to create the local cache in the ~/.bashrc.d/.dashboard_cache.
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +42,11 @@ function dashboard_fast() {
|
||||
|
||||
|
||||
#### Cache ####
|
||||
CACHE_DIR="/tmp/.dashboard_cache"
|
||||
if [ $LOCAL_CACHE -ne 0 ]; then
|
||||
CACHE_DIR="/tmp/.dashboard_cache"
|
||||
else
|
||||
CACHE_DIR="/home/$(whoami)/.bashrc.d/.dashboard_cache"
|
||||
fi
|
||||
mkdir -p "$CACHE_DIR"
|
||||
|
||||
#### Overview ####
|
||||
|
||||
Reference in New Issue
Block a user