Subversion Repositories ALCASAR

Rev

Rev 2433 | Rev 2454 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2433 Rev 2444
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 2433 2017-10-30 23:02:21Z richard $
2
# $Id: alcasar-uninstall.sh 2444 2017-11-26 23:08:16Z richard $
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 85... Line 85...
85
rm -f /root/ALCASAR* && echo -n "1"
85
rm -f /root/ALCASAR* && echo -n "1"
86
sleep 1
86
sleep 1
87
 
87
 
88
echo -en "\n- init (2) : "
88
echo -en "\n- init (2) : "
89
[ -e /boot/grub2/user.cfg ] && rm -f /boot/grub2/user.cfg && echo -n "1, "
89
[ -e /boot/grub2/user.cfg ] && rm -f /boot/grub2/user.cfg && echo -n "1, "
90
[ -e /etc/grub.d/default-10_linux ] || mv -f /etc/grub.d/default-10_linux /etc/grub.d/10_linux && echo -n "2"
90
[ -e /root/grub.default ] && mv -f /root/grub.default /etc/grub.d/10_linux && echo -n "2"
91
sleep 1
91
sleep 1
92
 
92
 
93
echo -en "\n- ACC (11) : "
93
echo -en "\n- ACC (11) : "
94
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
94
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
95
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-webl && echo -n "2, "
95
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-webl && echo -n "2, "
Line 227... Line 227...
227
done
227
done
228
[ -e /lib/systemd/system/fail2ban.service.default ] && mv /lib/systemd/system/fail2ban.service.default /lib/systemd/system/fail2ban.service && echo -n "8"
228
[ -e /lib/systemd/system/fail2ban.service.default ] && mv /lib/systemd/system/fail2ban.service.default /lib/systemd/system/fail2ban.service && echo -n "8"
229
sleep 1
229
sleep 1
230
 
230
 
231
echo -en "\n- cron (11) : "
231
echo -en "\n- cron (11) : "
232
i=0
232
i=1
233
for cron in `ls /etc/cron.d/alcasar-*`
233
for cron in `ls /etc/cron.d/alcasar-*`
234
do
234
do
235
        i=`expr $i + 1`
-
 
236
        rm $cron && echo -n "$i, "
235
        rm $cron && echo -n "$i, "
-
 
236
        i=`expr $i + 1`
237
done
237
done
238
[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "10, "
238
[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "10, "
239
[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "11"
239
[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "11"
240
sleep 1
240
sleep 1
241
 
241