Devboot update: 23-10-04-23-06-58
This commit is contained in:
18
docker/composes/syncthing/docker-compose.yml
Normal file
18
docker/composes/syncthing/docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
version: "3"
|
||||
services:
|
||||
syncthing:
|
||||
image: syncthing/syncthing
|
||||
container_name: syncthing
|
||||
hostname: my-syncthing
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
volumes:
|
||||
- ./volumes/syncthing:/var/syncthing
|
||||
ports:
|
||||
- 8384:8384 # Web UI
|
||||
- 22000:22000/tcp # TCP file transfers
|
||||
- 22000:22000/udp # QUIC file transfers
|
||||
- 21027:21027/udp # Receive local discovery broadcasts
|
||||
restart: unless-stopped
|
||||
@@ -43,6 +43,10 @@ alias rld="source ${HOME}/.zshrc"
|
||||
alias zshrc="lvim ${HOME}/.zshrc && rld"
|
||||
alias tm="tmux"
|
||||
alias tmf="tmuxifier"
|
||||
alias d="docker"
|
||||
alias dc="docker compose"
|
||||
alias k="kubectl"
|
||||
alias mk="minikube"
|
||||
|
||||
# paths
|
||||
export PATH=${PATH}:${HOME}/.local/bin
|
||||
@@ -51,15 +55,17 @@ export PATH="$HOME/.tmuxifier/bin:$PATH"
|
||||
|
||||
# docker
|
||||
# https://gbbigardi.medium.com/wsl-2-arch-docker-e-um-pouco-mais-do-meu-ambiente-de-desenvolvimento-42adc48368d4
|
||||
# DOCKER_DISTRO="Arch"
|
||||
# DOCKER_DIR=/mnt/wsl/shared-docker
|
||||
# DOCKER_SOCK="$DOCKER_DIR/docker.sock"
|
||||
# export DOCKER_HOST="unix://$DOCKER_SOCK"
|
||||
# if [ ! -S "$DOCKER_SOCK" ]; then
|
||||
# mkdir -pm o=,ug=rwx "$DOCKER_DIR"
|
||||
# chgrp docker "$DOCKER_DIR"
|
||||
# /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
|
||||
# fi
|
||||
dockerRun() {
|
||||
DOCKER_DISTRO="Arch"
|
||||
DOCKER_DIR=/mnt/wsl/shared-docker
|
||||
DOCKER_SOCK="$DOCKER_DIR/docker.sock"
|
||||
export DOCKER_HOST="unix://$DOCKER_SOCK"
|
||||
# if [ ! -S "$DOCKER_SOCK" ]; then
|
||||
# mkdir -pm o=,ug=rwx "$DOCKER_DIR"
|
||||
# chgrp docker "$DOCKER_DIR"
|
||||
# /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
|
||||
# fi
|
||||
}
|
||||
|
||||
eval "$(tmuxifier init -)"
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
31
my-scripts/arch/timers/createSymLinks.sh
Executable file
31
my-scripts/arch/timers/createSymLinks.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
my_timers_dir=${HOME}/repos/personal-devboot/my-scripts/arch/timers
|
||||
system_timers_dir=/etc/systemd/system/
|
||||
|
||||
createSymLink() {
|
||||
link_from=$1
|
||||
link_to=$2
|
||||
|
||||
sudo ln --symbolic --force ${link_from} ${link_to}
|
||||
}
|
||||
|
||||
startTimer() {
|
||||
timer_name=$1
|
||||
|
||||
sudo systemctl enable ${timer_name}
|
||||
sudo systemctl start ${timer_name}
|
||||
}
|
||||
|
||||
timers_files=($(find ~+ -type f -name '*.timer'))
|
||||
services_files=($(find ~+ -type f -name '*.service'))
|
||||
|
||||
for timer_file in ${timers_files[@]}; do
|
||||
createSymLink ${timer_file} ${system_timers_dir}
|
||||
# startTimer "$(basename ${timer_file})"
|
||||
done
|
||||
|
||||
for service_file in ${services_files[@]}; do
|
||||
createSymLink ${service_file} ${system_timers_dir}
|
||||
# startTimer "$(basename ${service_file})"
|
||||
done
|
||||
6
my-scripts/arch/timers/rclone-syncs.service
Normal file
6
my-scripts/arch/timers/rclone-syncs.service
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Run rclone-syncs.sh
|
||||
|
||||
[Service]
|
||||
ExecStart=rclone-syncs.sh
|
||||
|
||||
10
my-scripts/arch/timers/rclone-syncs.timer
Normal file
10
my-scripts/arch/timers/rclone-syncs.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run rclone-syncs.sh every 10 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=10min
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
3
my-scripts/pshell/AddOpenTerminalHereContextMenu.txt
Normal file
3
my-scripts/pshell/AddOpenTerminalHereContextMenu.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://github.com/lextm/windowsterminal-shell.git
|
||||
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; .\install.ps1 mini
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to display usage information
|
||||
# show_help() {
|
||||
# echo "Usage: $0 [options]"
|
||||
# echo "Options:"
|
||||
# echo " --compose Start compose containers"
|
||||
# echo " --help Display this help message"
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
# docker without docker desktop yippie!!!
|
||||
# source: https://gbbigardi.medium.com/wsl-2-arch-docker-e-um-pouco-mais-do-meu-ambiente-de-desenvolvimento-42adc48368d4
|
||||
|
||||
if [ ! -S "$DOCKER_SOCK" ]; then
|
||||
mkdir -pm o=,ug=rwx "$DOCKER_DIR"
|
||||
chgrp docker "$DOCKER_DIR"
|
||||
sudo /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
|
||||
fi
|
||||
|
||||
# Check for options
|
||||
# case "$1" in
|
||||
# --compose)
|
||||
# sleep 2
|
||||
# cd ~/documents/repos/zaks-clouds-manager/
|
||||
# docker compose up -d
|
||||
# ;;
|
||||
# --help)
|
||||
# show_help
|
||||
# ;;
|
||||
# *)
|
||||
# echo "Unknown option: $1"
|
||||
# show_help
|
||||
# ;;
|
||||
# esac
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# docker
|
||||
DOCKER_DISTRO="Arch"
|
||||
DOCKER_DIR=/mnt/wsl/shared-docker
|
||||
DOCKER_SOCK="$DOCKER_DIR/docker.sock"
|
||||
export DOCKER_HOST="unix://$DOCKER_SOCK"
|
||||
if [ ! -S "$DOCKER_SOCK" ]; then
|
||||
mkdir -pm o=,ug=rwx "$DOCKER_DIR"
|
||||
chgrp docker "$DOCKER_DIR"
|
||||
/mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
|
||||
fi
|
||||
# if [ ! -S "$DOCKER_SOCK" ]; then
|
||||
# mkdir -pm o=,ug=rwx "$DOCKER_DIR"
|
||||
# chgrp docker "$DOCKER_DIR"
|
||||
# /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
|
||||
# fi
|
||||
|
||||
Reference in New Issue
Block a user