Compare commits
4 Commits
6816dbfd96
...
15256b302c
| Author | SHA1 | Date | |
|---|---|---|---|
| 15256b302c | |||
| 78c273b4c7 | |||
| 994fc64f42 | |||
| 339378fc13 |
@@ -1,5 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Starten des code-server
|
||||
|
||||
# Überprüfen, ob eine PASSWORD Umgebungsvariable gesetzt ist
|
||||
if [ -z "$PASSWORD" ]; then
|
||||
echo "Starte Code Server ohne Passwort..."
|
||||
# Konfiguration für keinen Authentifizierungsmodus
|
||||
echo "bind-addr: 0.0.0.0:8443
|
||||
auth: none
|
||||
password:" > /config/code-server/config.yaml
|
||||
else
|
||||
echo "Starte Code Server mit Passwort..."
|
||||
# Konfiguration für Passwort-Authentifizierungsmodus
|
||||
echo "bind-addr: 0.0.0.0:8443
|
||||
auth: password
|
||||
password: $PASSWORD" > /config/code-server/config.yaml
|
||||
fi
|
||||
|
||||
# Die ID der Extension, die installiert werden soll
|
||||
EXTENSION_ID="james-yu.latex-workshop"
|
||||
|
||||
@@ -11,5 +28,5 @@ else
|
||||
echo "Extension ${EXTENSION_ID} ist bereits installiert."
|
||||
fi
|
||||
|
||||
# Starten des code-server
|
||||
exec code-server --bind-addr 0.0.0.0:8443 --auth none
|
||||
# Starte den Code Server mit der Konfigurationsdatei
|
||||
code-server --config /config/code-server/config.yaml
|
||||
|
||||
Reference in New Issue
Block a user