mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-06-28 07:56:52 +00:00
14 lines
381 B
Bash
14 lines
381 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
SCRIPT=$(readlink -f "$0")
|
||
|
UPGRADEDIR=$(dirname "${SCRIPT}")
|
||
|
INSTALLPATH=$(dirname "${UPGRADEDIR}")
|
||
|
TOPDIR=$(dirname "${INSTALLPATH}")
|
||
|
|
||
|
seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.py
|
||
|
seahub_settings_py=${TOPDIR}/seahub_settings.py
|
||
|
|
||
|
line="SECRET_KEY = \"$(python $seahub_secret_keygen)\""
|
||
|
|
||
|
sed -i -e "/SECRET_KEY/c\\$line" $seahub_settings_py
|