17 lines
718 B
Bash
17 lines
718 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
POSTGRES_USER=${POSTGRES_USER:-}
|
||
|
POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-}
|
||
|
POSTGRES_DB=${POSTGRES_DB:-firefish}
|
||
|
SONIC_HOST=${SONIC_HOST:-}
|
||
|
SONIC_PORT=${SONIC_PORT:-1491}
|
||
|
SONIC_SECRET=${SONIC_SECRET:-}
|
||
|
|
||
|
if [ -f /firefish/.config/default.yml ]; then
|
||
|
sed -i "s/\[POSTGRES_USER\]/$POSTGRES_USER/g" /firefish/.config/default.yml
|
||
|
sed -i "s/\[POSTGRES_PASSWORD\]/$POSTGRES_PASSWORD/g" /firefish/.config/default.yml
|
||
|
sed -i "s/\[POSTGRES_DB\]/$POSTGRES_DB/g" /firefish/.config/default.yml
|
||
|
sed -i "s/\[SONIC_HOST\]/$SONIC_HOST/g" /firefish/.config/default.yml
|
||
|
sed -i "s/\[SONIC_PORT\]/$SONIC_PORT/g" /firefish/.config/default.yml
|
||
|
sed -i "s/\[SONIC_SECRET\]/$SONIC_SECRET/g" /firefish/.config/default.yml
|
||
|
fi
|