summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rwxr-xr-xinstall28
1 files changed, 28 insertions, 0 deletions
diff --git a/install b/install
new file mode 100755
index 0000000..d16dbfa
--- /dev/null
+++ b/install
@@ -0,0 +1,28 @@
1#!/bin/sh
2
3# backup... tjust in case...
4echo "Backup of firewall.local -> $PWD/data/backups/firewall.$(date +"%Y_%m_%d_%I_%M_%p_%s").local"
5mkdir -p $PWD/data/backups
6cp /etc/sysconfig/firewall.local $PWD/data/backups/firewall.$(date +"%Y_%m_%d_%I_%M_%p_%s").local
7
8# Another backup!
9echo "Backup of firewall.local -> firewall.local.old"
10cp -PL /etc/sysconfig/firewall.local /etc/sysconfig/firewall.local.old
11
12# iterator
13
14if [[ ! -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
20fi
21
22# rules!
23
24if [[ ! -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
28fi