All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

nuno

Joined 4 months ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 582

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 function cmd::group::show() {
2 local name=""
3
4 while [[ $# -gt 0 ]]; do
5 case "$1" in
6 --name) util::require_flag "--name" "${2:-}" || return 1; name="$2"; shift 2 ;;
7 --help) cmd::group::help; return ;;
8 *) log::error "Unknown flag: $1"; return 1 ;;
9 esac
10 done

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 function cmd::list::_render_row() {
2 local client_name="$1" ip="$2" type="$3"
3
4 local pubkey="${p_pubkeys[$client_name]:-}"
5 local handshake_ts="${wg_handshakes[$pubkey]:-0}"
6 local is_blocked="${p_blocked[$client_name]:-false}"
7 local is_restricted="${p_restricted[$client_name]:-false}"
8 local last_ts="${p_last_ts[$client_name]:-}"
9
10 # Apply status filters

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 UNUSED: cmd::add::on_load
2 UNUSED: cmd::audit::on_load
3 UNUSED: cmd::audit::run
4 UNUSED: cmd::block::on_load
5 UNUSED: cmd::config::on_load
6 UNUSED: cmd::config::run
7 UNUSED: cmd::fw::on_load
8 UNUSED: cmd::fw::run
9 UNUSED: cmd::fw::stats
10 UNUSED: cmd::group::on_load

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 wgctl test --fn cmd::unblock::run --verbose
2
3 ────────────────────────────────────────────────
4 Function Test: cmd::unblock::run
5 ────────────────────────────────────────────────
6
7 cmd::unblock::run
8 ──────────────────────────────────────────────────
9
10 ────────────────────────────────────────────────

nuno / rule.command.sh

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::rule::on_load() {
8 flag::register --name
9 flag::register --desc
10 flag::register --block-ip

nuno / unblock.command.sh

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::unblock::on_load() {
8 flag::register --name
9 flag::register --type
10 flag::register --force

nuno / rename.command.sh

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::remove::on_load() {
8 flag::register --name
9 flag::register --type
10 flag::register --force

nuno / rename.command.sh

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::rename::on_load() {
8 flag::register --name
9 flag::register --type
10 flag::register --new-name

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 function cmd::block::run() {
2 local name=""
3 local type=""
4 local ips=()
5 local subnets=()
6 local ports=()
7 local quiet=false
8
9 while [[ $# -gt 0 ]]; do
10 case "$1" in

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 wgctl test --section destructive --verbose
2
3 ────────────────────────────────────────────────
4 wgctl Test Suite
5 ────────────────────────────────────────────────
6
7 Destructive (modifying state)
8 ──────────────────────────────────────────────────
9 ❌ add phone peer
10 Output: => ERROR: ❌ Client already exists: phone-testunit
Newer Older

Powered by Opengist ⋅ Load: 108ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ KrilHub