Replace hard-copded plague-client config with a template

master
Daniel Berteaud 7 years ago
parent 899a7d35df
commit 5d393cfe41
  1. 10
      bin/buildwatcher
  2. 7
      conf/plague-client.template
  3. 1
      conf/watcher.conf

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

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

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

Loading…
Cancel
Save