Subversion Repositories ALCASAR

Rev

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

Rev 2689 Rev 2728
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 2689 2019-01-20 10:50:15Z lucas.echard $
2
# $Id: alcasar-uninstall.sh 2728 2019-05-20 20:55:06Z 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 62... Line 62...
62
freeradius ()
62
freeradius ()
63
{
63
{
64
        echo -en "(12) : "
64
        echo -en "(12) : "
65
        [ -e /etc/raddb/empty-radiusd-db.sql ] && rm -f /etc/raddb/empty-radiusd-db.sql && echo -n "1, "
65
        [ -e /etc/raddb/empty-radiusd-db.sql ] && rm -f /etc/raddb/empty-radiusd-db.sql && echo -n "1, "
66
        [ -e /etc/raddb/radiusd.conf.default ] && mv /etc/raddb/radiusd.conf.default /etc/raddb/radiusd.conf && echo -n "2, "
66
        [ -e /etc/raddb/radiusd.conf.default ] && mv /etc/raddb/radiusd.conf.default /etc/raddb/radiusd.conf && echo -n "2, "
-
 
67
        [ -e /etc/raddb/dictionary.default ] && mv /etc/raddb/dictionary.default /etc/raddb/dictionary && echo -n "3, "
67
        [ -e /etc/raddb/sites-enabled/alcasar ] && rm /etc/raddb/sites-enabled/alcasar && echo -n "3, "
68
        [ -e /etc/raddb/sites-enabled/alcasar ] && rm /etc/raddb/sites-enabled/alcasar && echo -n "4, "
68
        [ -e /etc/raddb/sites-available/alcasar ] && rm /etc/raddb/sites-available/alcasar && echo -n "4, "
69
        [ -e /etc/raddb/sites-available/alcasar ] && rm /etc/raddb/sites-available/alcasar && echo -n "5, "
69
        [ -e /etc/raddb/sites-available/alcasar-with-ldap ] && rm /etc/raddb/sites-available/alcasar-with-ldap && echo -n "5, "
70
        [ -e /etc/raddb/sites-available/alcasar-with-ldap ] && rm /etc/raddb/sites-available/alcasar-with-ldap && echo -n "6, "
70
        [ -e /etc/raddb/clients.conf.default ] && mv /etc/raddb/clients.conf.default /etc/raddb/clients.conf && echo -n "6, "
71
        [ -e /etc/raddb/clients.conf.default ] && mv /etc/raddb/clients.conf.default /etc/raddb/clients.conf && echo -n "7, "
-
 
72
        echo -n "8"
71
        [ -e /etc/raddb/mods-enabled/ldap ] && rm /etc/raddb/mods-enabled/ldap && echo -n "7, " #Add here other mods
73
        for mods in sql sqlcounter attr_filter expiration logintime pap expr always
-
 
74
        do
72
        [ -e /etc/raddb/mods-enabled/sql ] && rm /etc/raddb/mods-enabled/sql && echo -n "7bis, " #Add here other mods
75
                rm /etc/raddb/mods-enabled/$mods && echo -n"."
-
 
76
        done
73
        [ -e /etc/raddb/mods-available/ldap-alcasar ] && rm /etc/raddb/mods-available/ldap-alcasar && echo -n "8, "
77
        echo -n ", "
74
        [ -e /etc/raddb/mods-available/sql.default ] && mv /etc/raddb/mods-available/sql.default /etc/raddb/mods-available/sql && echo -n "9, "
78
        [ -e /etc/raddb/mods-available/ldap-alcasar ] && rm -f /etc/raddb/mods-enabled/ldap-alcasar && rm /etc/raddb/mods-available/ldap-alcasar echo -n "9, "
75
        [ -e /etc/raddb/mods-config/sql/main/mysql/queries.conf.default ] && mv /etc/raddb/mods-config/sql/main/mysql/queries.conf.default /etc/raddb/mods-config/sql/main/mysql/queries.conf && echo -n "10, "
79
        [ -e /etc/raddb/mods-config/sql/main/mysql/queries.conf.default ] && mv /etc/raddb/mods-config/sql/main/mysql/queries.conf.default /etc/raddb/mods-config/sql/main/mysql/queries.conf && echo -n "10, "
76
        [ -e /lib/systemd/system/radiusd.service.default ] && mv /lib/systemd/system/radiusd.service.default /lib/systemd/system/radiusd.service && echo -n "11, "
80
        [ -e /lib/systemd/system/radiusd.service.default ] && mv /lib/systemd/system/radiusd.service.default /lib/systemd/system/radiusd.service && echo -n "11, "
77
        [ -e /etc/raddb/mods-available/sqlcounter.default ] && mv /etc/raddb/mods-available/sqlcounter.default /etc/raddb/mods-available/sqlcounter && echo -n "12"
81
        [ -e /etc/raddb/mods-available/sqlcounter.default ] && mv /etc/raddb/mods-available/sqlcounter.default /etc/raddb/mods-available/sqlcounter && echo -n "12"
78
        [ -e /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf.default ]    && mv /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf.default    /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf    && echo -n ", 12a"
82
        [ -e /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf.default ]    && mv /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf.default    /etc/raddb/mods-config/sql/counter/mysql/dailycounter.conf    && echo -n ", 12a"
79
        [ -e /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf.default ]  && mv /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf.default  /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf  && echo -n ", 12b"
83
        [ -e /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf.default ]  && mv /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf.default  /etc/raddb/mods-config/sql/counter/mysql/monthlycounter.conf  && echo -n ", 12b"