diff options
Diffstat (limited to 'sbin/e2guardian-update-shallalists')
-rwxr-xr-x | sbin/e2guardian-update-shallalists | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/sbin/e2guardian-update-shallalists b/sbin/e2guardian-update-shallalists deleted file mode 100755 index 756e83c..0000000 --- a/sbin/e2guardian-update-shallalists +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2016 by Mike Gabriel <mike.gabriel@it-zukunft-schule.de> - -# This script is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -set -e - -unset http_proxy -unset https_proxy -unset ftp_proxy - -SHALLA_BLACKLIST_URL="http://www.shallalist.de/Downloads/shallalist.tar.gz" - -mkdir -p /var/lib/e2guardian/ -curl "$SHALLA_BLACKLIST_URL" 1> /var/lib/e2guardian/blacklists.tar.gz 2>/dev/null - -if [ -e /var/lib/e2guardian/.blacklists.new ]; then - rm -Rf /var/lib/e2guardian/.blacklists.new -fi - -mkdir -p /var/lib/e2guardian/.blacklists.new - -cd /var/lib/e2guardian/.blacklists.new -tar xzf /var/lib/e2guardian/blacklists.tar.gz - -mv BL/* . -rmdir BL/ - -cd - 1>/dev/null - -if [ -e /var/lib/e2guardian/blacklists.old ]; then - rm -Rf /var/lib/e2guardian/blacklists.old -fi - -if [ -d /var/lib/e2guardian/blacklists ]; then - mv /var/lib/e2guardian/blacklists /var/lib/e2guardian/blacklists.old -fi - -if [ ! -e /var/lib/e2guardian/blacklists ]; then - mv /var/lib/e2guardian/.blacklists.new /var/lib/e2guardian/blacklists - - LANG=C date 1> /var/lib/e2guardian/last-updated.txt - - chown root:root -Rf /var/lib/e2guardian/blacklists - chmod -Rf a+r /var/lib/e2guardian/blacklists - cd /var/lib/e2guardian/blacklists - find * -type d | while read dir; do - chmod a+x "${dir}" - done - cd - 1> /dev/null - - invoke-rc.d e2guardian restart 1>/dev/null 2>/dev/null -fi - -if [ -e /var/lib/e2guardian/blacklists.tar.gz ]; then - rm -f /var/lib/e2guardian/blacklists.tar.gz -fi - |