Skip to content

Commit

Permalink
update: docker container doesnt have ufw
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Oct 12, 2018
1 parent a9b1542 commit 51918ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ EOF
[[ "${URL: -1}" != "/" ]] && ncc config:system:set overwrite.cli.url --value="${URL}/"

# Implement logrotate restrictions
grep -q "^\& stop" /etc/rsyslog.d/20-ufw.conf || echo "& stop" >> /etc/rsyslog.d/20-ufw.conf
grep -q maxsize /etc/logrotate.d/ufw || sed -i /weekly/amaxsize2M /etc/logrotate.d/ufw
[[ -f /etc/rsyslog.d/20-ufw.conf ]] && { grep -q "^\& stop" /etc/rsyslog.d/20-ufw.conf || echo "& stop" >> /etc/rsyslog.d/20-ufw.conf; }
[[ -f /etc/logrotate.d/ufw ]] && { grep -q maxsize /etc/logrotate.d/ufw || sed -i /weekly/amaxsize2M /etc/logrotate.d/ufw; }
grep -q maxsize /etc/logrotate.d/apache2 || sed -i /weekly/amaxsize2M /etc/logrotate.d/apache2
service rsyslog restart
service rsyslog restart &>/dev/null
cat >> /etc/logrotate.d/ncp <<'EOF'
/var/log/ncp.log
{
Expand Down

0 comments on commit 51918ff

Please sign in to comment.