14 lines
542 B
Bash
14 lines
542 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
CONTAINER_FIRST_STARTUP="CONTAINER_FIRST_STARTUP"
|
||
|
|
||
|
if [ ! -e /work/$CONTAINER_FIRST_STARTUP ]; then
|
||
|
touch /work/$CONTAINER_FIRST_STARTUP
|
||
|
su - postgres -c "initdb /var/lib/postgresql/data"
|
||
|
su - postgres -c "pg_ctl start -D /var/lib/postgresql/data -l /var/lib/postgresql/log.log"
|
||
|
su - postgres -c "psql --command \"create user kurs with superuser password 'HerrErbe';\""
|
||
|
else
|
||
|
su - postgres -c "pg_ctl start -D /var/lib/postgresql/data -l /var/lib/postgresql/log.log"
|
||
|
fi
|
||
|
|
||
|
/usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf
|