Compare commits

...

2 Commits

Author SHA1 Message Date
shuki
b22a8d14a7 Update repository URLs to use gitea SSH config alias
Replace hardcoded 192.168.100.100 addresses with gitea SSH alias
from ~/.ssh/config across CLAUDE.md, README.md, and install.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 06:16:13 +02:00
shuki
bf6624b607 Add daily stats collection cron job at 05:00 UTC
The gniza stats command is now automatically scheduled when
install_schedules() runs, tagged as # gniza:_stats so it is
managed alongside backup schedules (installed/removed together).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:33:55 +02:00
4 changed files with 11 additions and 18 deletions

View File

@@ -785,6 +785,4 @@ rm -rf "$PLUGIN_TMPDIR"
| | URL | | | URL |
|---|-----| |---|-----|
| **Git (SSH)** | `ssh://git@192.168.100.100:2222/shukivaknin/gniza.git` | | **Git (SSH)** | `gitea:shukivaknin/gniza.git` (uses `Host gitea` from `~/.ssh/config`) |
| **Git (HTTP)** | `http://192.168.100.100:3001/shukivaknin/gniza.git` |
| **Web UI** | http://192.168.100.100:3001/shukivaknin/gniza |

View File

@@ -8,20 +8,14 @@ Uses `pkgacct --nocompress --skiphomedir` for account backups, gzips SQL files i
| | URL | | | URL |
|---|-----| |---|-----|
| **Git (SSH)** | `ssh://git@192.168.100.100:2222/shukivaknin/gniza.git` | | **Git (SSH)** | `gitea:shukivaknin/gniza.git` (uses `Host gitea` from `~/.ssh/config`) |
| **Git (HTTP)** | `http://192.168.100.100:3001/shukivaknin/gniza.git` |
| **Web UI** | http://192.168.100.100:3001/shukivaknin/gniza |
## Installation ## Installation
```bash From a clone:
curl -sSL http://192.168.100.100:3001/shukivaknin/gniza/raw/branch/main/scripts/install.sh | sudo bash
```
Or from a local clone:
```bash ```bash
git clone ssh://git@192.168.100.100:2222/shukivaknin/gniza.git git clone gitea:shukivaknin/gniza.git
cd gniza cd gniza
sudo bash scripts/install.sh sudo bash scripts/install.sh
``` ```

View File

@@ -206,6 +206,10 @@ install_schedules() {
filtered+="$line"$'\n' filtered+="$line"$'\n'
done <<< "$current_crontab" done <<< "$current_crontab"
# Append daily stats collection (runs at 05:00 UTC)
new_lines+="${GNIZA_CRON_TAG}_stats"$'\n'
new_lines+="0 5 * * * /usr/local/bin/gniza stats >> /var/log/gniza/cron-stats.log 2>&1"$'\n'
# Append new lines # Append new lines
local final="${filtered}${new_lines}" local final="${filtered}${new_lines}"

View File

@@ -1,15 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# gniza installer — single-line install: # gniza installer — from a local clone:
# bash <(curl -sSL http://192.168.100.100:3001/shukivaknin/gniza/raw/branch/main/scripts/install.sh)
#
# Or from a local clone:
# bash scripts/install.sh # bash scripts/install.sh
set -eo pipefail set -eo pipefail
INSTALL_DIR="/usr/local/gniza" INSTALL_DIR="/usr/local/gniza"
BIN_LINK="/usr/local/bin/gniza" BIN_LINK="/usr/local/bin/gniza"
REPO_HTTP="http://192.168.100.100:3001/shukivaknin/gniza.git" REPO_SSH="gitea:shukivaknin/gniza.git"
TMPDIR_CLONE="" TMPDIR_CLONE=""
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
@@ -24,7 +21,7 @@ if [[ -n "${SCRIPT_DIR:-}" && -f "$SCRIPT_DIR/../bin/gniza" ]]; then
else else
echo "Cloning gniza..." echo "Cloning gniza..."
TMPDIR_CLONE="$(mktemp -d)" TMPDIR_CLONE="$(mktemp -d)"
git clone --depth 1 "$REPO_HTTP" "$TMPDIR_CLONE" 2>&1 git clone --depth 1 "$REPO_SSH" "$TMPDIR_CLONE" 2>&1
SOURCE_DIR="$TMPDIR_CLONE" SOURCE_DIR="$TMPDIR_CLONE"
fi fi