# My Custom Linux Scripts Index

#### This page tracks custom scripts I’ve written or installed on my systems, primarily placed in `/usr/local/bin` for global use. Each script is either a utility, security tool, or automation helper I use regularly.

---

## 📁 Script Directory: `/usr/local/bin`

This directory is in the system `$PATH` and allows me to run any executable script from **any location** in the terminal.

To make a script globally accessible:

```bash
sudo mv myscript.sh /usr/local/bin/myscript
sudo chmod +x /usr/local/bin/myscript

```

Then simply run:

```bash
myscript

```

---

## 📜 Script List

<table id="bkmrk-script-name-descript"><thead><tr><th>Script Name</th><th>Description</th><th>Created / Added On</th></tr></thead><tbody><tr><td>`bookstack-backup`</td><td>Creates and compresses daily BookStack backup</td><td>May 4, 2025</td></tr><tr><td>`update-syncthing-ufw`</td><td>Dynamically updates UFW with resolved DDNS IP</td><td>May 10, 2025</td></tr><tr><td>`syncthing-log-summary`</td><td>Summarizes UFW log attempts on Syncthing ports</td><td>May 10, 2025</td></tr><tr><td>`fail2ban-ip-lookup`</td><td>Enriches banned IPs with GeoIP, PTR, AbuseIPDB</td><td>May 12, 2025</td></tr><tr><td>`clear-fail2ban-cache`</td><td>Removes stale lookup results for a clean run</td><td>(Planned)</td></tr><tr><td>`mygreeting`</td><td>Test script: echoes a message from anywhere</td><td>(Planned)</td></tr></tbody></table>

---

## 🧠 Tips

- Use clear, lowercase names without `.sh` extensions for simplicity
- Add versioning or logs inside long-running scripts
- Store source versions of scripts in `/opt/scripts/` or Git repo for management

---

## 🛠️ Related Commands

Make a script executable:

```bash
chmod +x scriptname

```

Test if a command is globally accessible:

```bash
which scriptname

```

Check your system PATH:

```bash
echo $PATH

```