tracker
All repositories: gitoria
2.0 KB
#!/bin/bash# realdata-m034.sh <start|stop> <tree> <copy> <port> — mission 034 (tracker#40, the curated franchise seed), NOT the gate. Starts an# app tree on a COPY of live `storage/` (<copy>/storage, STATUS "How to repeat") with every background job OFF but the franchise# seed (TRACKER_COLLECTIONS=1 in the caller's env: the collection seed too). With a `.env` link in <tree> (real TMDB token, never read) the seed imports what is missing; without one it only builds.# Writes a session for the creator (az5b2 = user 0mujqspn0aqb) → <copy>/sid; log <copy>/server.log, RSS every 10 s <copy>/rss.log;# stop kills the PID in <copy>/server.pid.mode=$1; tree=$2; R=$3; port=$4if [ "$mode" = stop ]; then pid=$(cat $R/server.pid); kill $pid; while kill -0 $pid 2>/dev/null; do sleep 1; done; echo "stopped $pid"; exit 0; fimkdir -p $R/sessionssid=$(head -c 16 /dev/urandom | xxd -p); now=$(date +%s%3N)echo "{\"created\":$now,\"data\":{\"tag\":\"t\"},\"id\":\"$sid\",\"seen\":$now,\"user\":{\"id\":\"0mujqspn0aqb\"}}" > $R/sessions/$(printf %s "$sid" | sha256sum | cut -d' ' -f1)echo $sid > $R/sidcd $treeenv TRACKER_SYNC=0 TRACKER_ART=0 TRACKER_PHOTOS=0 TRACKER_BACKFILL=0 TRACKER_REPAIR=0 TRACKER_KINDS=0 TRACKER_CREDITS=0 TRACKER_COLLECTIONS=${TRACKER_COLLECTIONS:-0} TRACKER_MERGE=0 TRACKER_SHORTIDS=0 \TRACKER_PORT=$port TRACKER_URL=http://127.0.0.1:$port HL_HOST=127.0.0.1 TRACKER_WATCH=0 \TRACKER_STORAGE=$R/storage/mpackdb TRACKER_SESSIONS=$R/sessions/ TRACKER_OLD_SHORT_IDS=$tree/data/old-short-ids.json \setsid ./bin/hybriel project.hl >> $R/server.log 2>&1 < /dev/null &pid=$!; echo $pid > $R/server.pid( t0=$(date +%s); while kill -0 $pid 2>/dev/null; do echo "$(( $(date +%s) - t0 )) $(date +%T) $(awk '/VmRSS/{print $2}' /proc/$pid/status 2>/dev/null)" >> $R/rss.log; sleep 10; done ) > /dev/null 2>&1 < /dev/null &t0=$(date +%s)until curl -s -o /dev/null http://127.0.0.1:$port/; do sleep 1; kill -0 $pid 2>/dev/null || { echo "server died"; tail -20 $R/server.log; exit 1; }; doneecho "pid $pid listening after $(( $(date +%s) - t0 )) s"
Branches
Latest commits
- ec54fc35Move show page logic into the shows topicmre
- c1a8d074log: correct timesmre
- 5827eba9log: HM57 merged, HM59 startedmre
- d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
- a404ed75Report HM57 audit, gates and integration notesmre
- 1dcb87a7Use plain declarations for unchanged bindingsmre
- b90395e3log: HM51 mergedmre
- 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
- 4399bc2fReference remaining component-owned root Style rulesmre
- 9edcc2dflog: #58 live, HM57 startedmre
- 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
- aed12917Reference owned Style rules in genres and searchmre
- 14195720log: HM49B done, HM51 startedmre
- 78ee6b56Move remaining component styles into Style blocksmre
- 7f04de33log: HM49Bmre
- 00616cf3log: #49 batch merged, DP67 startedmre
- d7232e86Merge hm49-styles: tracker#49 first batch of component stylesmre
- 079f376dMove seven components' styles into Style blocksmre
- 17d66feelog: #58 mergedmre
- 69a6640bMerge hm58-map: tracker#58 project.hl only the mapmre