Code Update
This commit is contained in:
@ -1,19 +1,15 @@
|
||||
wx-start(){
|
||||
wx-header "Warén CLI" h1
|
||||
|
||||
if [[ $USER != "root" && $USER != "local" ]]
|
||||
mkdir -p $HOME/.warengroup &> /dev/null
|
||||
|
||||
if [[ ! -f "$HOME/.warengroup/config.json" || $(cat $HOME/.warengroup/config.json | jq -e . >/dev/null 2>&1 | echo ${PIPESTATUS[1]}) -gt 0 ]]
|
||||
then
|
||||
mkdir -p $HOME/.warengroup &> /dev/null
|
||||
touch $HOME/.warengroup/config.json &> /dev/null
|
||||
|
||||
if [[ ! -f "$HOME/.warengroup/config.json" || $(cat $HOME/.warengroup/config.json | jq -e . >/dev/null 2>&1 | echo ${PIPESTATUS[1]}) -gt 0 ]]
|
||||
then
|
||||
echo '{}' | jq > $HOME/.warengroup/config.json
|
||||
fi
|
||||
|
||||
mkdir -p $HOME/.ssh/keys
|
||||
chmod 700 -R $HOME/.ssh/keys
|
||||
mkdir -p $HOME/.ssh/multiplex
|
||||
chmod 700 -R $HOME/.ssh/multiplex
|
||||
echo '{}' | jq > $HOME/.warengroup/config.json
|
||||
fi
|
||||
|
||||
mkdir -p $HOME/.ssh/keys
|
||||
chmod 700 -R $HOME/.ssh/keys
|
||||
mkdir -p $HOME/.ssh/multiplex
|
||||
chmod 700 -R $HOME/.ssh/multiplex
|
||||
}
|
||||
|
Reference in New Issue
Block a user