Replace hard-copded plague-client config with a template

This commit is contained in:
Daniel Berteaud 2017-11-19 13:26:52 +01:00
parent 899a7d35df
commit 5d393cfe41
3 changed files with 8 additions and 10 deletions

View File

@ -23,15 +23,7 @@ inotifywait -e moved_to -r -m --format %w%f $WATCHED_DIR | while read SRPM; do
[ -z $EMAIL ] && EMAIL=$ADMIN_EMAIL
PLAGUE_CONF=$(mktemp)
# TODO: make the plague client config file templated
cat <<_EOF > $PLAGUE_CONF
[Server]
use_ssl = no
address = $PLAGUE_SERVER
allow_uploads = yes
[User]
email = $EMAIL
_EOF
cat /etc/buildwatcher/plague-client.template | sed -e "s/__EMAIL__/$EMAIL/g" > $PLAGUE_CONF
PLAGUE_CLIENT_CONFIG=$PLAGUE_CONF plague-client build $NAME $SRPM $DIST
rm -f $SRPM $PLAGUE_CONF

View File

@ -0,0 +1,7 @@
[Server]
use_ssl = no
address = http://localhost:8887
allow_uploads = yes
[User]
email = __EMAIL__

View File

@ -2,4 +2,3 @@ TOP_DIR=/var/lib/build
LDAP_URI=ldap://directory.domain.com/
LDAP_USER_BASE=ou=Users,dc=domain,dc=com
ADMIN_EMAIL=admin@domain.com
PLAGUE_SERVER=http://localhost:8887