Subversion Repositories ALCASAR

Rev

Rev 2845 | Rev 2867 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2845 Rev 2864
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 2845 2020-07-04 17:54:03Z rexy $
2
# $Id: alcasar-uninstall.sh 2864 2020-10-18 09:06:17Z rexy $
3
 
3
 
4
# alcasar-uninstall.sh
4
# alcasar-uninstall.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 190... Line 190...
190
        [ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "12"
190
        [ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "12"
191
}
191
}
192
 
192
 
193
fail2ban ()
193
fail2ban ()
194
{
194
{
195
        echo -en "(7) : "
195
        echo -en "(6) : "
196
        [ -e /etc/fail2ban/jail.conf.default ] && mv /etc/fail2ban/jail.conf.default /etc/fail2ban/jail.conf && echo -n "1, "
196
        [ -e /etc/fail2ban/jail.conf.default ] && mv /etc/fail2ban/jail.conf.default /etc/fail2ban/jail.conf && echo -n "1, "
197
        [ -e /etc/fail2ban/action.d/iptables-allports.conf.default ] && mv /etc/fail2ban/action.d/iptables-allports.conf.default /etc/fail2ban/action.d/iptables-allports.conf && echo -n "2, "
197
        [ -e /etc/fail2ban/action.d/iptables-allports.conf.default ] && mv /etc/fail2ban/action.d/iptables-allports.conf.default /etc/fail2ban/action.d/iptables-allports.conf # only for ALCASAR version <= V3.5.1
198
        i=2
198
        i=2
199
        for filter in `ls /etc/fail2ban/filter.d/alcasar_* 2>/dev/null`
199
        for filter in `ls /etc/fail2ban/filter.d/alcasar_* 2>/dev/null`
200
        do
200
        do
201
                i=`expr $i + 1`
201
                i=`expr $i + 1`
202
                rm $filter && echo -n "$i, "
202
                rm $filter && echo -n "$i, "
203
        done
203
        done
204
        [ -e /lib/systemd/system/fail2ban.service.default ] && mv /lib/systemd/system/fail2ban.service.default /lib/systemd/system/fail2ban.service && echo -n "7"
204
        [ -e /lib/systemd/system/fail2ban.service.default ] && mv /lib/systemd/system/fail2ban.service.default /lib/systemd/system/fail2ban.service && echo -n "6"
205
}
205
}
206
 
206
 
207
gammu_smsd ()
207
gammu_smsd ()
208
{
208
{
209
        echo -en "(3) : "
209
        echo -en "(3) : "
Line 232... Line 232...
232
        [ -e /opt/acme.sh ] && rm -rf /opt/acme.sh && echo -n "3"
232
        [ -e /opt/acme.sh ] && rm -rf /opt/acme.sh && echo -n "3"
233
}
233
}
234
 
234
 
235
post_install ()
235
post_install ()
236
{
236
{
237
echo -en "(7) : "
237
echo -en "(8) : "
238
        [ -e /etc/mageia-release.default ] && mv -f /etc/mageia-release.default /etc/mageia-release && echo -n "1, "
238
        [ -e /etc/mageia-release.default ] && mv -f /etc/mageia-release.default /etc/mageia-release && echo -n "1, "
239
        [ -e /etc/ssh/alcasar-banner-ssh ] && rm -f /etc/ssh/alcasar-banner-ssh && echo -n "2, "
239
        [ -e /etc/ssh/alcasar-banner-ssh ] && rm -f /etc/ssh/alcasar-banner-ssh && echo -n "2, "
240
        [ -e /etc/ssh/sshd_config.default ] && mv -f /etc/ssh/sshd_config.default /etc/ssh/sshd_config && echo -n "3, "
240
        [ -e /etc/ssh/sshd_config.default ] && mv -f /etc/ssh/sshd_config.default /etc/ssh/sshd_config && echo -n "3, "
241
        [ -e /etc/bashrc.default ] && mv -f /etc/bashrc.default /etc/bashrc && echo -n "4, "
241
        [ -e /etc/bashrc.default ] && mv -f /etc/bashrc.default /etc/bashrc && echo -n "4, "
242
        [ -e /etc/sudoers.default ] && mv -f /etc/sudoers.default /etc/sudoers && echo -n "5, "
242
        [ -e /etc/sudoers.default ] && mv -f /etc/sudoers.default /etc/sudoers && echo -n "5, "
243
        [ -e /lib/systemd/system/alcasar-load_balancing.service ] && rm -f /lib/systemd/system/alcasar-load_balancing.service && echo -n "6, "
243
        [ -e /lib/systemd/system/alcasar-load_balancing.service ] && rm -f /lib/systemd/system/alcasar-load_balancing.service && echo -n "6, "
-
 
244
        [ -e /etc/security/limits.conf.default ] && mv -f /etc/security/limits.conf.default /etc/security/limits.conf && echo -n "7, "
244
        [ -e /etc/default/grub.default ] && mv -f /etc/default/grub.default /etc/default/grub && echo -n "7"
245
        [ -e /etc/default/grub.default ] && mv -f /etc/default/grub.default /etc/default/grub && echo -n "8"
245
}
246
}
246
 
247
 
247
 
248
 
248
usage="Usage: alcasar-uninstall.sh {-update or --update} | {-full or --full}"
249
usage="Usage: alcasar-uninstall.sh {-update or --update} | {-full or --full}"
249
 
250