Subversion Repositories ALCASAR

Rev

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

Rev 3273 Rev 3274
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 3273 2025-04-27 09:26:14Z rexy $
2
#  $Id: alcasar.sh 3274 2025-04-27 13:19:12Z rexy $
3
 
3
 
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, apache, php, netfilter, e2guardian, ntpd, openssl, unbound, gammu, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, apache, php, netfilter, e2guardian, ntpd, openssl, unbound, gammu, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 1885... Line 1885...
1885
	cat <<EOF > /etc/cron.d/alcasar-mariadb
1885
	cat <<EOF > /etc/cron.d/alcasar-mariadb
1886
# Verify, repair and export users database (every monday at 4:45 am)
1886
# Verify, repair and export users database (every monday at 4:45 am)
1887
45 4 * * 1 root $DIR_DEST_BIN/alcasar-mariadb.sh --dump
1887
45 4 * * 1 root $DIR_DEST_BIN/alcasar-mariadb.sh --dump
1888
# Remove users whose expiration date is exceeded for more more than 7 days (every Monday at 4:40 am)
1888
# Remove users whose expiration date is exceeded for more more than 7 days (every Monday at 4:40 am)
1889
40 4 * * * root $DIR_DEST_BIN/alcasar-mariadb.sh --expire_user 2>&1 >/dev/null
1889
40 4 * * * root $DIR_DEST_BIN/alcasar-mariadb.sh --expire_user 2>&1 >/dev/null
-
 
1890
# Remove users who haven't logged in for more than a year (every Monday at 4:35 am)
-
 
1891
35 4 * * * root $DIR_DEST_BIN/alcasar-mariadb.sh --old_user 2>&1 >/dev/null
1890
EOF
1892
EOF
1891
	cat <<EOF > /etc/cron.d/alcasar-archive
1893
	cat <<EOF > /etc/cron.d/alcasar-archive
1892
# Archiving logs (traceability & users database) (every Monday at 5:35 am)
1894
# Archiving logs (traceability & users database) (every Monday at 5:35 am)
1893
35 5 * * 1 root $DIR_DEST_BIN/alcasar-archive.sh --now
1895
35 5 * * 1 root $DIR_DEST_BIN/alcasar-archive.sh --now
1894
EOF
1896
EOF