madiba-elate commited on
Commit
d677cf3
·
verified ·
1 Parent(s): 461c97f

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +4 -5
start.sh CHANGED
@@ -4,11 +4,10 @@ set -e
4
  DATA_DIR=/data
5
  JSON_FILE=/defaults/library.json
6
 
7
- # Création du dossier persistant et attribution des droits à l'utilisateur archivebox (UID 911)
8
  mkdir -p "$DATA_DIR"
9
  chown -R 911:911 "$DATA_DIR"
10
 
11
- # Initialisation d’ArchiveBox si la base n’existe pas encore
12
  if [ ! -f "$DATA_DIR/index.sqlite3" ]; then
13
  echo "=== Initialisation d'ArchiveBox ==="
14
  gosu 911 archivebox init --setup
@@ -19,7 +18,6 @@ if [ -f "$JSON_FILE" ]; then
19
  echo "=== Ajout des URLs depuis library.json ==="
20
  python3 -c "
21
  import json, subprocess
22
-
23
  with open('$JSON_FILE') as f:
24
  data = json.load(f)
25
  for url in data.get('urls', []):
@@ -28,5 +26,6 @@ for url in data.get('urls', []):
28
  "
29
  fi
30
 
31
- echo "=== Démarrage du serveur ArchiveBox ==="
32
- exec gosu 911 archivebox server --port 7860 --quick-init 0.0.0.0
 
 
4
  DATA_DIR=/data
5
  JSON_FILE=/defaults/library.json
6
 
 
7
  mkdir -p "$DATA_DIR"
8
  chown -R 911:911 "$DATA_DIR"
9
 
10
+ # Initialisation de la base si elle n’existe pas encore
11
  if [ ! -f "$DATA_DIR/index.sqlite3" ]; then
12
  echo "=== Initialisation d'ArchiveBox ==="
13
  gosu 911 archivebox init --setup
 
18
  echo "=== Ajout des URLs depuis library.json ==="
19
  python3 -c "
20
  import json, subprocess
 
21
  with open('$JSON_FILE') as f:
22
  data = json.load(f)
23
  for url in data.get('urls', []):
 
26
  "
27
  fi
28
 
29
+ echo "=== Démarrage du serveur ArchiveBox sur le port 7860 ==="
30
+ # Le port se passe sous la forme 0.0.0.0:7860, sans --port
31
+ exec gosu 911 archivebox server --quick-init 0.0.0.0:7860