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