Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-urpmi.sh 2318 2017-07-03 21:38:15Z richard $
|
2 |
# $Id: alcasar-urpmi.sh 2416 2017-09-17 21:01:15Z richard $
|
3 |
|
3 |
|
4 |
# alcasar-urpmi.sh
|
4 |
# alcasar-urpmi.sh
|
5 |
# by 3abtux and Rexy
|
5 |
# by 3abtux and Rexy
|
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 |
|
8 |
# script de mise en place des dépots RPM
|
8 |
# script de mise en place des dépots RPM
|
9 |
# configure the RPM repository
|
9 |
# configure the RPM repository
|
10 |
|
10 |
|
11 |
Lang=`echo $LANG|cut -c 1-2`
|
11 |
Lang=`echo $LANG|cut -c 1-2`
|
12 |
VERSION="5"
|
12 |
VERSION="6"
|
13 |
ARCH="x86_64"
|
13 |
ARCH="x86_64"
|
14 |
# The kernel version we compile netflow for
|
14 |
# The kernel version we compile netflow for
|
15 |
KERNEL="kernel-server-4.4.74-1.mga5-1-1.mga5"
|
15 |
KERNEL="kernel-server-4.9.50-1.mga6-1.1.mga6"
|
16 |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
|
16 |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
|
17 |
PACKAGES="arp-scan vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysqli php-mbstring php-sockets php-cli php-curl php-pdo_sqlite php-json rng-utils rsync clamav perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg ulogd pm-fallback-policy ipset cronie-anacron gammu usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop man kernel-firmware-nonfree dos2unix p7zip bc msec kernel-userspace-headers"
|
17 |
PACKAGES="arp-scan vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php dansguardian postfix mariadb ntp bind-utils openssh-server php-xml php-ldap php-mysqli php-mbstring php-sockets php-cli php-curl php-pdo_sqlite php-json rng-utils rsync clamav perl-rrdtool perl-MailTools perl-Socket6 fail2ban gnupg ulogd pm-fallback-policy ipset cronie-anacron gammu usbutils locales-en usb_modeswitch tinyproxy vnstat php-gd sudo iftop man dos2unix p7zip bc msec kernel-userspace-headers"
|
18 |
|
18 |
|
19 |
rpm_repository_sync ()
|
19 |
rpm_repository_sync ()
|
20 |
{
|
20 |
{
|
21 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
21 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
22 |
{
|
22 |
{
|
Line 212... |
Line 212... |
212 |
then
|
212 |
then
|
213 |
echo "Cleaning the system : "
|
213 |
echo "Cleaning the system : "
|
214 |
else
|
214 |
else
|
215 |
echo "Nettoyage du système : "
|
215 |
echo "Nettoyage du système : "
|
216 |
fi
|
216 |
fi
|
217 |
rm_rpm="shorewall mandi avahi mageia-gfxboot-theme cpupower privoxy squid gamin"
|
217 |
rm_rpm="shorewall mandi grub2-mageia-theme"
|
218 |
/usr/sbin/urpme --auto -a $rm_rpm
|
218 |
/usr/sbin/urpme --auto -a $rm_rpm
|
219 |
/usr/sbin/urpme --auto --auto-orphans
|
219 |
/usr/sbin/urpme --auto --auto-orphans
|
220 |
|
220 |
|
221 |
# Save chilli launch script (erase with new rpm one)
|
221 |
# Save chilli launch script (erase with new rpm one)
|
222 |
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
|
222 |
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
|
Line 226... |
Line 226... |
226 |
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
|
226 |
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
|
227 |
# Clean the RPM cache
|
227 |
# Clean the RPM cache
|
228 |
urpmi --clean
|
228 |
urpmi --clean
|
229 |
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
|
229 |
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
|
230 |
/sbin/depmod -a
|
230 |
/sbin/depmod -a
|
231 |
exit 0
|
231 |
|