Update README.md
This commit is contained in:
commit
a0ecb76955
2 changed files with 56 additions and 0 deletions
17
README.md
Normal file
17
README.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# ZSH Custom Functions #
|
||||||
|
|
||||||
|
This repository contains some zsh custom functions.
|
||||||
|
|
||||||
|
## Installations: ##
|
||||||
|
* Put each folders (not zsh_function, but individual folders) to $HOME/.oh-my-zsh/plugins
|
||||||
|
* Load using **plugins** module by adding **each folder name**
|
||||||
|
|
||||||
|
## Currently Available: ##
|
||||||
|
* CBSD Jail control through jctl command with usages:
|
||||||
|
* jctl list : List All Jails
|
||||||
|
* jctl create : Create Jail (jconstruct-tui)
|
||||||
|
* jctl start (jail name) : Start Jail (jstart)
|
||||||
|
* jctl login (jail name) : Login to Jail (jlogin)
|
||||||
|
* jctl stop (jail name) : Stop Jail (jstop)
|
||||||
|
* jctl config (jail name) : Configure Jail (jconfig)
|
||||||
|
* jctl remove (jail name) : Remove Jail (jremove)
|
39
cbsd_jail/cbsd_jail.plugin.zsh
Normal file
39
cbsd_jail/cbsd_jail.plugin.zsh
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
jctl() {
|
||||||
|
if [[ "$1" == "create" ]]; then
|
||||||
|
cbsd jconstruct-tui;
|
||||||
|
elif [[ "$1" == "list" ]]; then
|
||||||
|
cbsd jls;
|
||||||
|
elif [[ "$1" == "start" ]]; then
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
cbsd jstart jname="$2"
|
||||||
|
else
|
||||||
|
echo "CBSD:Start - Missing Jail Name"
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "stop" ]]; then
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
cbsd jstop jname="$2"
|
||||||
|
else
|
||||||
|
echo "CBSD:Stop - Missing Jail Name"
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "config" ]]; then
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
cbsd jconfig jname="$2"
|
||||||
|
else
|
||||||
|
echo "CBSD:Config - Missing Jail Name"
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "remove" ]]; then
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
cbsd jremove jname="$2"
|
||||||
|
else
|
||||||
|
echo "CBSD:Remove - Missing Jail Name"
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "login" ]]; then
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
cbsd jlogin jname="$2"
|
||||||
|
else
|
||||||
|
echo "CBSD:Remove - Missing Jail Name"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "CBSD - Missing Switch";
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in a new issue