Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
fwdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19544e52
authored
Jul 30, 2015
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prettify fw.py
parent
65e5a910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fw.py
+2
-2
No files found.
fw.py
View file @
19544e52
...
@@ -77,9 +77,9 @@ def reload_firewall_vlan(data, save_config=True):
...
@@ -77,9 +77,9 @@ def reload_firewall_vlan(data, save_config=True):
def
reload_dhcp
(
data
):
def
reload_dhcp
(
data
):
with
open
(
'/etc/dhcp/dhcpd.conf.generated'
,
'w'
)
as
f
:
with
open
(
'/etc/dhcp/dhcpd.conf.generated'
,
'w'
)
as
f
:
f
.
write
(
"
\n
"
.
join
(
data
)
+
"
\n
"
)
f
.
write
(
"
\n
"
.
join
(
data
)
+
"
\n
"
)
if
is_there_systemd
():
if
is_there_systemd
():
sudo
((
'/bin/systemctl'
,
'restart'
,
'dhcpd'
))
sudo
((
'/bin/systemctl'
,
'restart'
,
'dhcpd'
))
else
:
else
:
sudo
((
'/etc/init.d/isc-dhcp-server'
,
'restart'
))
sudo
((
'/etc/init.d/isc-dhcp-server'
,
'restart'
))
logger
.
info
(
"DHCP configuration is reloaded."
)
logger
.
info
(
"DHCP configuration is reloaded."
)
...
...
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