add tinc to dockerfunc
This commit is contained in:
parent
3c5b0b13fb
commit
ef9940c1ee
1
.aliases
1
.aliases
|
@ -2,6 +2,7 @@ alias ..='cd ..'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../..'
|
||||||
alias ....='cd ../../..'
|
alias ....='cd ../../..'
|
||||||
alias .....='cd ../../../..'
|
alias .....='cd ../../../..'
|
||||||
|
alias rsync='rsync --progress -v'
|
||||||
|
|
||||||
alias ll='ls -ahlF'
|
alias ll='ls -ahlF'
|
||||||
alias la='ls -Ah'
|
alias la='ls -Ah'
|
||||||
|
|
21
.dockerfunc
21
.dockerfunc
|
@ -568,6 +568,27 @@ skype() {
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# call with net-name as param
|
||||||
|
tinc() {
|
||||||
|
local tinc_dir="${HOME}/.config/etc-tinc"
|
||||||
|
local NET_NAME=$1
|
||||||
|
if [[ -z ${NET_NAME} ]]; then
|
||||||
|
echo "Error: tinc needs to be called with a net-name!!"
|
||||||
|
else
|
||||||
|
local tinc_name=$(grep -Po '(?<=Name = )[\w]+' ${tinc_dir}/${NET_NAME}/tinc.conf)
|
||||||
|
local container_name="tinc_${tinc_name}"
|
||||||
|
echo " running ${container_name} in net ${NET_NAME}"
|
||||||
|
docker run -d \
|
||||||
|
--restart always \
|
||||||
|
--name= \
|
||||||
|
--device=/dev/net/tun \
|
||||||
|
--cap-add NET_ADMIN \
|
||||||
|
--volume ${tinc_dir}:/etc/tinc \
|
||||||
|
${DOCKER_REPO_PREFIX}/tinc \
|
||||||
|
-n ${NET_NAME} start -D
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
torbrowser() {
|
torbrowser() {
|
||||||
del_stopped torbrowser
|
del_stopped torbrowser
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue