blob: d16dbfa91dd0b7cf75960f938baae8f901fe6366 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
# backup... tjust in case...
echo "Backup of firewall.local -> $PWD/data/backups/firewall.$(date +"%Y_%m_%d_%I_%M_%p_%s").local"
mkdir -p $PWD/data/backups
cp /etc/sysconfig/firewall.local $PWD/data/backups/firewall.$(date +"%Y_%m_%d_%I_%M_%p_%s").local
# Another backup!
echo "Backup of firewall.local -> firewall.local.old"
cp -PL /etc/sysconfig/firewall.local /etc/sysconfig/firewall.local.old
# iterator
if [[ ! -L "/etc/sysconfig/firewall.local" ]] ; then
echo "Linking IPFire Custom Firewall Rules Looper"
echo "Installing $PWD/data/executable/firewall.local -> /etc/sysconfig/firewall.local"
rm /etc/sysconfig/firewall.local
cp $PWD/data/originals/firewall.looper $PWD/data/run/firewall.local
ln -s $PWD/data/run/firewall.local /etc/sysconfig/firewall.local
fi
# rules!
if [[ ! -L "/etc/sysconfig/rules.d" ]] ; then
echo "Linking IPFire Custom Firewall Rules"
echo "Installing $PWD/rules.d/ -> /etc/sysconfig/rules.d"
ln -s $PWD/rules.d /etc/sysconfig/rules.d
fi
|