addClipUser.sh + README: onboarding a gamer's clips via Syncthing
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
10
addClipUser.sh
Executable file
10
addClipUser.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Create the server-side clips folder for a Syncthing gamer. Name = their Authentik/Discord username (lowercase),
|
||||
# because the Jellyfin plugin treats the folder as the show and looks the person up by that name.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
u="${1:-}"; [[ $u =~ ^[a-z0-9_.-]{2,32}$ ]] || { echo "usage: $0 <username> (lowercase letters, digits, _ . -)"; exit 1; }
|
||||
sudo install -d -o 1000 -g 1000 "/srv/media/clips/$u"
|
||||
sudo install -m 0644 -o 1000 -g 1000 syncthing/stignore "/srv/media/clips/$u/.stignore"
|
||||
echo "ready: /srv/media/clips/$u (Syncthing path: /var/syncthing/clips/$u)"
|
||||
echo "next: pair their device in https://$(grep -E '^# vanguard:main' -A1 Caddyfile 2>/dev/null | tail -1 | awk '{print $1}')/sync/ and accept their folder at that path, Receive Only, min free 300 GB"
|
||||
Reference in New Issue
Block a user