Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
fwdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1176a7a8
authored
9 years ago
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fwdriver: fix systemd unit files and fw.py
parent
e2e90f5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
fw.py
+1
-1
miscellaneous/firewall-init.service
+4
-5
miscellaneous/firewall.service
+3
-2
No files found.
fw.py
View file @
1176a7a8
...
...
@@ -77,7 +77,7 @@ def reload_firewall_vlan(data, save_config=True):
def
reload_dhcp
(
data
):
with
open
(
'/etc/dhcp/dhcpd.conf.generated'
,
'w'
)
as
f
:
f
.
write
(
"
\n
"
.
join
(
data
)
+
"
\n
"
)
import
platform
if
platform
.
dist
()[
0
]
==
"centos"
:
sudo
((
'/bin/systemctl'
,
'restart'
,
'dhcpd'
))
else
:
...
...
This diff is collapsed.
Click to expand it.
miscellaneous/firewall-init.service
View file @
1176a7a8
[Unit]
Description=CIRCLE firewall
Description=CIRCLE firewall
init
After=network.target
#Before=firewall.service
[Service]
User=root
Group=root
WorkingDirectory=/home/fw/fwdriver
ExecStart=/bin/bash -c "/etc/init.d/openvswitch restart ; /sbin/ip netns add fw || true; ovs-vsctl del-br firewall || true; /sbin/ip netns exec fw sysctl -f /etc/sysctl.d/60-circle-firewall.conf; /sbin/ip netns exec fw ip link set lo up;"
Restart=always
Type=oneshot
ExecStart=/bin/bash -c "/bin/systemctl restart openvswitch ; /sbin/ip netns add fw || true; ovs-vsctl del-br firewall || true; /sbin/ip netns exec fw sysctl -f /etc/sysctl.d/60-circle-firewall.conf ; /sbin/ip netns exec fw ip link set lo up"
[Install]
WantedBy=multi-user.target
...
...
This diff is collapsed.
Click to expand it.
miscellaneous/firewall.service
View file @
1176a7a8
[Unit]
Description=CIRCLE firewall
After=network.target
Requires=firewall-init.service
After=firewall-init.service
[Service]
...
...
@@ -8,8 +9,8 @@ User=fw
Group=fw
WorkingDirectory=/home/fw/fwdriver
ExecStart=/bin/bash -c "
cd /home/fw/fwdriver ; . /home/fw/.virtualenvs/fw/bin/postactivate; . /home/fw/.virtualenvs/fw/bin/activate; HOSTNAME=$(hostname -s); exec celeryd -A fw -Q ${HOSTNAME}.firewall
--loglevel=info -c 1"
#ExecStartPost=/bin/s
ystemclt
restart dhcpd
ExecStart=/bin/bash -c "
. /home/fw/.virtualenvs/fw/bin/postactivate; . /home/fw/.virtualenvs/fw/bin/activate; exec celeryd -A fw -Q %H.firewall
--loglevel=info -c 1"
#ExecStartPost=/bin/s
udo /bin/systemctl
restart dhcpd
Restart=always
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment