From 47afe474a871bd8bffd3c3e073fe4d1928ca1caa Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 6 Feb 2024 09:31:11 +0100 Subject: [PATCH] fix(login): every-hour script & env var --- bin/every-hour.zsh | 6 ++++-- bin/once-connected.zsh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/every-hour.zsh b/bin/every-hour.zsh index 62443f3..06ba4a2 100755 --- a/bin/every-hour.zsh +++ b/bin/every-hour.zsh @@ -7,12 +7,14 @@ alias xterm='xterm -bg black -fg white -fa Hack -fs 10' ## Cloud folder must exist # if [ -z "$NC_STORAGE" ]; then - echo "${fg[red]}NC_STORAGE environment variable not set." + autoload colors && colors + echo "${fg[cyan]}NC_STORAGE${fg[red]} environment variable not set." exit 1 fi if [ ! -d $NC_STORAGE ]; then - echo "${fg[cyan]}$NC_STORAGE ${fg[red]}is not a folder (in \$NC_STORAGE)." + autoload colors && colors + echo "${fg[cyan]}\$NC_STORAGE (=$NC_STORAGE)${fg[red]} is not a folder." exit 2 fi diff --git a/bin/once-connected.zsh b/bin/once-connected.zsh index 49b6d81..277949a 100755 --- a/bin/once-connected.zsh +++ b/bin/once-connected.zsh @@ -14,7 +14,8 @@ xterm -geometry 120x40 -title "Mount devices" -hold -e $HOME/bin/mount_dev.zsh ## Start periodic actions # -$HOME/bin/every-hour.zsh + +eval xterm -hold -e env $(cat ~/.config/environment.d/variables.conf) $HOME/bin/every-hour.zsh ## Wait for an Internet connection