Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #138 from itsthejb/rspamd-group
Browse files Browse the repository at this point in the history
Rspamd group
  • Loading branch information
itsthejb authored Nov 15, 2019
2 parents 7375491 + bdf4c0b commit ebe50b3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ADD ./build/etc/default/pure-ftpd-common /etc/default/pure-ftpd-common

# --- 15 Install BIND DNS Server, haveged, unbound, rspamd
RUN apt-get -y --no-install-recommends install haveged unbound lsb-release; \
echo "do-ip6: no" >> /etc/unbound/unbound.conf; \
echo "do-ip6: no" > /etc/unbound/unbound.conf.d/no-ip6v.conf; \
if [ "$BUILD_REDIS" = "yes" ]; then \
apt-get -y --no-install-recommends install redis-server; \
sed -i "s|daemonize yes|daemonize no|" /etc/redis/redis.conf; \
Expand Down
1 change: 1 addition & 0 deletions build/supervisor/init.d/rspamd
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ chown -R _rspamd:_rspamd /run/rspamd
if [ -n "$REDIS_HOST" ]; then
echo " - configure redis host as $REDIS_HOST"
sed -i "s|servers = \".*\";|servers = \"$REDIS_HOST\";|" /etc/rspamd/local.d/redis.conf
grep -lR ":6379" /etc/rspamd | while read -r F; do sed -i'' 's|servers = .*:6379.*;|servers = "redis:6379";|' $F; done
fi
2 changes: 1 addition & 1 deletion build/supervisor/services.d/rspamd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:rspamd]
command=/usr/bin/rspamd -f -u _rspamd -c /etc/rspamd/rspamd.conf
command=/usr/bin/rspamd -f -u _rspamd -g _rspamd -c /etc/rspamd/rspamd.conf
stdout_logfile=/var/log/rspamd/rspamd.log
stderr_logfile=/var/log/rspamd/rspamd.log
priority=20
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
- HOSTNAME_EMAIL=mail.myhost.test.com # Hostname for email
- LANGUAGE=en # see ./build/autoinstall.ini
# disable services (apache2 clamav-daemon cron dovecot fail2ban mailman mysql postfix postfix pure-ftpd-mysql redis rspamd rsyslog spamassassin ssh unbound)
- DISABLED_SERVICES=mailman
- DISABLED_SERVICES=mailman unbound
- POSTGREY_DELAY=300
- POSTGREY_MAX_AGE=35
- POSTGREY_TEXT="Delayed by postgrey"
Expand Down
4 changes: 2 additions & 2 deletions test/bats/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ setup() {

@test "expected supervisor services running" {
run docker exec $CONTAINER supervisorctl status
for SERVICE in apache2 clamav-daemon cron dovecot fail2ban mysql php-fpm postfix postgrey pure-ftpd-mysql redis rspamd rsyslog spamassassin ssh unbound; do
for SERVICE in apache2 clamav-daemon cron dovecot fail2ban mysql php-fpm postfix postgrey pure-ftpd-mysql redis rspamd rsyslog spamassassin ssh; do
echo "$output" | grep "RUNNING" | grep "$SERVICE"
done
}

@test "expected supervisor services are disabled" {
run docker exec $CONTAINER supervisorctl status
for SERVICE in mailman; do
for SERVICE in mailman unbound; do
echo "$output" | grep "STOPPED" | grep "$SERVICE"
done
}
Expand Down

0 comments on commit ebe50b3

Please sign in to comment.