Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-uninstall.sh 2744 2019-07-28 09:29:15Z rexy $
|
2 |
# $Id: alcasar-uninstall.sh 2745 2019-07-28 22:11:33Z 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 77... |
Line 77... |
77 |
rm /etc/raddb/mods-enabled/$mods && echo -n "$i, "
|
77 |
rm /etc/raddb/mods-enabled/$mods && echo -n "$i, "
|
78 |
done
|
78 |
done
|
79 |
[ -e /etc/raddb/mods-available/ldap-alcasar ] && rm -f /etc/raddb/mods-enabled/ldap-alcasar && rm -f /etc/raddb/mods-available/ldap-alcasar && echo -n "16, "
|
79 |
[ -e /etc/raddb/mods-available/ldap-alcasar ] && rm -f /etc/raddb/mods-enabled/ldap-alcasar && rm -f /etc/raddb/mods-available/ldap-alcasar && echo -n "16, "
|
80 |
[ -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 "17, "
|
80 |
[ -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 "17, "
|
81 |
[ -e /lib/systemd/system/radiusd.service.default ] && mv /lib/systemd/system/radiusd.service.default /lib/systemd/system/radiusd.service && echo -n "18, "
|
81 |
[ -e /lib/systemd/system/radiusd.service.default ] && mv /lib/systemd/system/radiusd.service.default /lib/systemd/system/radiusd.service && echo -n "18, "
|
82 |
[ -e /etc/raddb/mods-available/sqlcounter.default ] && mv /etc/raddb/mods-available/sqlcounter.default /etc/raddb/mods-available/sqlcounter && echo -n "19"
|
82 |
[ -e /etc/raddb/mods-available/sqlcounter.default ] && mv /etc/raddb/mods-available/sqlcounter.default /etc/raddb/mods-available/sqlcounter && echo -n "19, "
|
83 |
[ -e /etc/raddb/mods-available/sql.default ] && mv /etc/raddb/mods-available/sql.default /etc/raddb/mods-available/sql && echo -n "20"
|
83 |
[ -e /etc/raddb/mods-available/sql.default ] && mv /etc/raddb/mods-available/sql.default /etc/raddb/mods-available/sql && echo -n "20"
|
84 |
[ -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 ", 21"
|
84 |
[ -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 ", 21"
|
85 |
[ -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 ", 22"
|
85 |
[ -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 ", 22"
|
86 |
[ -e /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf.default ] && mv /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf.default /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf && echo -n ", 23"
|
86 |
[ -e /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf.default ] && mv /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf.default /etc/raddb/mods-config/sql/counter/mysql/noresetcounter.conf && echo -n ", 23"
|
87 |
[ -e /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf.default ] && mv /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf.default /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf && echo -n ", 24"
|
87 |
[ -e /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf.default ] && mv /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf.default /etc/raddb/mods-config/sql/counter/mysql/expire_on_login.conf && echo -n ", 24"
|
Line 159... |
Line 159... |
159 |
[ -e /etc/vnstat.conf.default ] && mv /etc/vnstat.conf.default /etc/vnstat.conf && echo -n "1"
|
159 |
[ -e /etc/vnstat.conf.default ] && mv /etc/vnstat.conf.default /etc/vnstat.conf && echo -n "1"
|
160 |
}
|
160 |
}
|
161 |
|
161 |
|
162 |
dnsmasq ()
|
162 |
dnsmasq ()
|
163 |
{
|
163 |
{
|
164 |
echo -en "(2 if update ; 4 if uninstall) : "
|
164 |
echo -en "(4) : "
|
165 |
[ -e /etc/dnsmasq-whitelist.conf ] && rm /etc/dnsmasq-whitelist.conf && echo -n "1, "
|
165 |
[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "1, "
|
166 |
[ -e /lib/systemd/system/dnsmasq-whitelist.service ] && rm /lib/systemd/system/dnsmasq-whitelist.service && echo -n "2, "
|
166 |
[ -e /etc/dnsmasq-whitelist.conf ] && rm /etc/dnsmasq-whitelist.conf && echo -n "2, "
|
167 |
if [ $mode == "full" ] # don't remove dnsmasq in update mode (DHCP + DNS !)
|
- |
|
168 |
then
|
- |
|
169 |
[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "3, "
|
167 |
[ -e /lib/systemd/system/dnsmasq.service.default ] && mv /lib/systemd/system/dnsmasq.service.default /lib/systemd/system/dnsmasq.service && echo -n "3, "
|
170 |
[ -e /lib/systemd/system/dnsmasq.service.default ] && mv /lib/systemd/system/dnsmasq.service.default /lib/systemd/system/dnsmasq.service && echo -n "4"
|
168 |
[ -e /lib/systemd/system/dnsmasq-whitelist.service ] && rm /lib/systemd/system/dnsmasq-whitelist.service && echo -n "4"
|
171 |
fi
|
- |
|
172 |
}
|
169 |
}
|
173 |
|
170 |
|
174 |
unbound ()
|
171 |
unbound ()
|
175 |
{
|
172 |
{
|
176 |
echo -en "(5) : "
|
173 |
echo -en "(5) : "
|