Code Update

This commit is contained in:
Christer Warén
2025-06-23 09:35:37 +03:00
parent eb14aa46ff
commit fe56c50bfb
4 changed files with 30 additions and 28 deletions

View File

@ -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
}