fix scripts
This commit is contained in:
parent
61a16825e4
commit
614138d1ec
@ -1,5 +1,38 @@
|
|||||||
#!/usr/bin/zsh
|
#!/usr/bin/zsh
|
||||||
|
|
||||||
|
# typeset -A dir
|
||||||
|
# dir["wiki"]="/mnt/store/Store.Disk/Wiki"
|
||||||
|
# dir["st"]="/mnt/store"
|
||||||
|
# dir["sthome"]="/mnt/store/home"
|
||||||
|
# dir["sd"]="/mnt/store/Store.Disk"
|
||||||
|
# dir["app"]="/mnt/develop/application"
|
||||||
|
# dir["bin"]="/mnt/develop/bin"
|
||||||
|
# dir["cpp"]="/mnt/develop/projects/cpp"
|
||||||
|
# dir["golang"]="/mnt/develop/projects/golang"
|
||||||
|
# dir["pr"]="/mnt/develop/projects"
|
||||||
|
# dir["dev"]="/mnt/develop"
|
||||||
|
# dir["config"]="/home/chatlanin/.config"
|
||||||
|
# dir["docker"]="/mnt/develop/projects/docker"
|
||||||
|
# dir["gitea"]="/mnt/develop/projects/golang/gitea"
|
||||||
|
# dir["sandbox"]="/mnt/develop/projects/cpp/sandbox"
|
||||||
|
# dir["server"]="/mnt/develop/projects/server"
|
||||||
|
# dir["actorfm"]="/mnt/develop/projects/cpp/actorfm"
|
||||||
|
# dir["actorfm.asio"]="/mnt/develop/projects/cpp/actorfm.asio"
|
||||||
|
# dir["dwm"]="/mnt/develop/application/dwm/dwm.6.2"
|
||||||
|
# dir["base"]="/mnt/develop/projects/cpp/base"
|
||||||
|
# dir["hack"]="/mnt/develop/projects/cpp/hack"
|
||||||
|
# dir["rrr"]="/mnt/develop/projects/cpp/rrr"
|
||||||
|
# dir["rendert"]="/mnt/develop/projects/cpp/rendert"
|
||||||
|
# dir["trycaster"]="/mnt/develop/projects/cpp/trycaster"
|
||||||
|
# dir["trycaster.web"]="/mnt/develop/projects/cpp/trycaster/trycaster.web"
|
||||||
|
# dir["league.dance"]="/mnt/develop/projects/cpp/league.dance/v2.0"
|
||||||
|
# dir["goto"]="/mnt/develop/projects/cpp/goto"
|
||||||
|
# dir["auth.base"]="/mnt/develop/projects/cpp/auth.base"
|
||||||
|
# dir["fonmix"]="/mnt/develop/projects/cpp/fonmix"
|
||||||
|
# dir["chatlanin.com.ru"]="/mnt/develop/projects/cpp/chatlanin.com.ru"
|
||||||
|
# dir["task_book"]="/mnt/develop/projects/cpp/task_book"
|
||||||
|
# dir["lua"]="/mnt/develop/projects/lua"
|
||||||
|
|
||||||
typeset -A srv
|
typeset -A srv
|
||||||
srv["trycaster"]="ssh -p 4999 chatlanin@92.53.65.239"
|
srv["trycaster"]="ssh -p 4999 chatlanin@92.53.65.239"
|
||||||
srv["dev_em"]="ssh a.zimin@dev01.emd01.lwb.d-net.pro"
|
srv["dev_em"]="ssh a.zimin@dev01.emd01.lwb.d-net.pro"
|
||||||
@ -13,10 +46,22 @@ array["dir"]=dir
|
|||||||
array["srv"]=srv
|
array["srv"]=srv
|
||||||
|
|
||||||
MODE_1=\"$1\"
|
MODE_1=\"$1\"
|
||||||
|
# MODE_2=\"$2\"
|
||||||
INDEX=1
|
INDEX=1
|
||||||
|
|
||||||
if [[ $MODE_1 == \"\" ]] then
|
if [[ $MODE_1 == \"\" ]] then
|
||||||
|
# echo ""
|
||||||
|
# OUTPUT="POS. # DIR'S # COMMAND\n----#--------------------------------#--------------------------------------------------------"
|
||||||
|
#
|
||||||
|
# for key value in ${(kv)dir}; do
|
||||||
|
# OUTPUT="$OUTPUT\n $INDEX # $BOLD$BLUE$key$RESET_COLOR # $ITALIC$CYAN$value$RESET_COLOR"
|
||||||
|
# INDEX=$((INDEX + 1))
|
||||||
|
# done
|
||||||
|
#
|
||||||
|
# echo -ne $OUTPUT | column -ts $'#'
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
INDEX=1
|
INDEX=1
|
||||||
OUTPUT="POS. # SERVER NAME # COMMAND\n----#--------------------------------#--------------------------------------------------------"
|
OUTPUT="POS. # SERVER NAME # COMMAND\n----#--------------------------------#--------------------------------------------------------"
|
||||||
for key value in ${(kv)srv}; do
|
for key value in ${(kv)srv}; do
|
||||||
@ -26,9 +71,23 @@ if [[ $MODE_1 == \"\" ]] then
|
|||||||
|
|
||||||
echo -ne $OUTPUT | column -ts $'#'
|
echo -ne $OUTPUT | column -ts $'#'
|
||||||
|
|
||||||
|
# read MODE_1 MODE_2
|
||||||
read MODE_1
|
read MODE_1
|
||||||
MODE_1=\"$MODE_1\"
|
MODE_1=\"$MODE_1\"
|
||||||
|
# MODE_2=\"$MODE_2\"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# case $MODE_1 in
|
||||||
|
# \"dir\")
|
||||||
|
# cmd=${${(P)array[$MODE_1]}[$MODE_2]}
|
||||||
|
# cd $cmd
|
||||||
|
# ;;
|
||||||
|
# \"srv\")
|
||||||
|
# cmd=${${(P)array[$MODE_1]}[$MODE_2]}
|
||||||
|
# bash -c $cmd
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
|
||||||
cmd=${${(P)array["srv"]}[$MODE_1]}
|
cmd=${${(P)array["srv"]}[$MODE_1]}
|
||||||
bash -c $cmd
|
bash -c $cmd
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
sudo openvpn /home/$USER/openvpn.conf
|
var_user="a.zimin"
|
||||||
|
var_pass="!1979Rekmnbdfnjh2021"
|
||||||
|
|
||||||
|
source "$HOME/bin/scripts/system/style"
|
||||||
|
echo -ne $BOLD$GREEN"user:$RESET_COLOR $var_user"
|
||||||
|
echo -ne $BOLD$GREEN"pass:$RESET_COLOR $var_pass"
|
||||||
|
|
||||||
|
sudo openvpn /home/chatlanin/openvpn.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user