add scpt cron
This commit is contained in:
26
test/env
26
test/env
@ -1,26 +1,10 @@
|
||||
cfg=~/.config/ai/test.json
|
||||
|
||||
if [ ! -f $cfg ] || ! cat $cfg|jq . || [ "`cat $cfg|jq .host`" = "null" ] || [ -z "`cat $cfg`" ];then
|
||||
mkdir -p ~/.config/ai
|
||||
echo server:
|
||||
read host
|
||||
|
||||
echo password:
|
||||
read pass
|
||||
|
||||
echo handle:
|
||||
read handle
|
||||
|
||||
echo "{ \"host\":\"$host\", \"password\":\"$pass\", \"handle\":\"$handle\" }" >> $cfg
|
||||
fi
|
||||
|
||||
host=`cat $cfg|jq -r .host`
|
||||
handle=`cat $cfg|jq -r .handle`
|
||||
pass=`cat $cfg|jq -r .password`
|
||||
date=`date --iso-8601=seconds`
|
||||
|
||||
if [ ! -f $cfg.t ];then
|
||||
$d/token.zsh
|
||||
if [ -f $cfg ];then
|
||||
host=`cat $cfg|jq -r .host`
|
||||
handle=`cat $cfg|jq -r .handle`
|
||||
pass=`cat $cfg|jq -r .password`
|
||||
date=`date --iso-8601=seconds`
|
||||
fi
|
||||
|
||||
if [ -f $cfg.t ];then
|
||||
|
Reference in New Issue
Block a user