2ch commited on
Commit
6f2667e
·
verified ·
1 Parent(s): bdd7830

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +12 -0
entrypoint.sh CHANGED
@@ -1,4 +1,16 @@
1
  #!/bin/bash
 
 
 
 
 
 
 
 
 
 
 
 
2
  WEBDAV_USER=${WEBDAV_USER:-"[email protected]"}
3
  WEBDAV_PASSWORD=${WEBDAV_PASSWORD:-"password"}
4
  WEBDAV_URL=${WEBDAV_URL:-"https://webdav.yandex.com/sillytavern"}
 
1
  #!/bin/bash
2
+ CONFIG_FILE="/tavern/config.yaml"
3
+ LOGIN=${LOGIN:-"admin"}
4
+ PASSWORD=${PASSWORD:-"admin"}
5
+ sed -i.bak -E \
6
+ -e "s|^([[:space:]]*username:)[[:space:]]+\"admin\"|\1 \"$NEW_USER\"|" \
7
+ -e "s|^([[:space:]]*password:)[[:space:]]+\"admin\"|\1 \"$NEW_PASS\"|" \
8
+ "$CONFIG_FILE"
9
+ if [ $? -eq 0 ]; then
10
+ echo "логин и пароль успешно установлены."
11
+ else
12
+ echo "не удалось установить логин и пароль в конфиг" >&2
13
+ exit 1
14
  WEBDAV_USER=${WEBDAV_USER:-"[email protected]"}
15
  WEBDAV_PASSWORD=${WEBDAV_PASSWORD:-"password"}
16
  WEBDAV_URL=${WEBDAV_URL:-"https://webdav.yandex.com/sillytavern"}