Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
d7d1a07a
Commit
d7d1a07a
authored
Apr 07, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup configd usage
parent
64e8208e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
27 deletions
+40
-27
gwlb.inc
src/etc/inc/gwlb.inc
+2
-2
system.inc
src/etc/inc/system.inc
+1
-1
vpn.inc
src/etc/inc/vpn.inc
+1
-1
pkg_upgrade.sh
src/opnsense/scripts/pkg_upgrade.sh
+1
-1
actions_interface.conf
src/opnsense/service/conf/actions.d/actions_interface.conf
+32
-0
actions_service.conf
src/opnsense/service/conf/actions_service.conf
+0
-19
ppp-linkdown
src/sbin/ppp-linkdown
+1
-1
ppp-linkup
src/sbin/ppp-linkup
+2
-2
No files found.
src/etc/inc/gwlb.inc
View file @
d7d1a07a
...
@@ -98,8 +98,8 @@ rrd interval 60s;
...
@@ -98,8 +98,8 @@ rrd interval 60s;
## These parameters can be overridden in a specific alarm configuration
## These parameters can be overridden in a specific alarm configuration
alarm default {
alarm default {
command on "/usr/local/opnsense/service/configd_ctl.py '
service reload dyndns %T' 'service reload ipsecdns' 'service reload openvpn
%T' 'filter reload' "
command on "/usr/local/opnsense/service/configd_ctl.py '
dyndns reload %T' 'ipsecdns reload' 'openvpn reload
%T' 'filter reload' "
command off "/usr/local/opnsense/service/configd_ctl.py '
service reload dyndns %T' 'service reload ipsecdns' 'service reload openvpn
%T' 'filter reload' "
command off "/usr/local/opnsense/service/configd_ctl.py '
dyndns reload %T' 'ipsecdns reload' 'openvpn reload
%T' 'filter reload' "
combine 10s
combine 10s
}
}
...
...
src/etc/inc/system.inc
View file @
d7d1a07a
...
@@ -548,7 +548,7 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
...
@@ -548,7 +548,7 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
$hostnames
=
""
;
$hostnames
=
""
;
array_unique
(
$filterdns_list
);
array_unique
(
$filterdns_list
);
foreach
(
$filterdns_list
as
$hostname
)
foreach
(
$filterdns_list
as
$hostname
)
$hostnames
.=
"cmd
{
$hostname
}
'/usr/local/opnsense/service/configd_ctl.py
\"
service reload routedns
\"
'
\n
"
;
$hostnames
.=
"cmd
{
$hostname
}
'/usr/local/opnsense/service/configd_ctl.py
\"
routedns reload
\"
'
\n
"
;
file_put_contents
(
"
{
$g
[
'varetc_path'
]
}
/filterdns-route.hosts"
,
$hostnames
);
file_put_contents
(
"
{
$g
[
'varetc_path'
]
}
/filterdns-route.hosts"
,
$hostnames
);
unset
(
$hostnames
);
unset
(
$hostnames
);
...
...
src/etc/inc/vpn.inc
View file @
d7d1a07a
...
@@ -836,7 +836,7 @@ EOD;
...
@@ -836,7 +836,7 @@ EOD;
$hostnames
=
""
;
$hostnames
=
""
;
array_unique
(
$filterdns_list
);
array_unique
(
$filterdns_list
);
foreach
(
$filterdns_list
as
$hostname
)
foreach
(
$filterdns_list
as
$hostname
)
$hostnames
.=
"cmd
{
$hostname
}
'/usr/local/opnsense/service/configd_ctl.py
\"
service reload ipsecdns
\"
'
\n
"
;
$hostnames
.=
"cmd
{
$hostname
}
'/usr/local/opnsense/service/configd_ctl.py
\"
ipsecdns reload
\"
'
\n
"
;
file_put_contents
(
"/usr/local/etc/filterdns-ipsec.hosts"
,
$hostnames
);
file_put_contents
(
"/usr/local/etc/filterdns-ipsec.hosts"
,
$hostnames
);
unset
(
$hostnames
);
unset
(
$hostnames
);
...
...
src/opnsense/scripts/pkg_upgrade.sh
View file @
d7d1a07a
...
@@ -41,7 +41,7 @@ if [ -z "$pkg_running" ]; then
...
@@ -41,7 +41,7 @@ if [ -z "$pkg_running" ]; then
# update all installed packages
# update all installed packages
pkg upgrade
-y
>>
${
PKG_PROGRESS_FILE
}
pkg upgrade
-y
>>
${
PKG_PROGRESS_FILE
}
# restart the web server
# restart the web server
/usr/local/opnsense/service/configd_ctl.py
'
service restart webgui
'
>>
${
PKG_PROGRESS_FILE
}
/usr/local/opnsense/service/configd_ctl.py
'
webgui restart
'
>>
${
PKG_PROGRESS_FILE
}
# remove no longer referenced packages
# remove no longer referenced packages
pkg autoremove
-y
>>
${
PKG_PROGRESS_FILE
}
pkg autoremove
-y
>>
${
PKG_PROGRESS_FILE
}
elif
[
"
$package
"
==
"pkg"
]
;
then
elif
[
"
$package
"
==
"pkg"
]
;
then
...
...
src/opnsense/service/conf/actions.d/actions_interface.conf
View file @
d7d1a07a
...
@@ -15,3 +15,35 @@ command:/usr/local/etc/rc.newwanip
...
@@ -15,3 +15,35 @@ command:/usr/local/etc/rc.newwanip
parameters
:%
s
parameters
:%
s
type
:
script
type
:
script
message
:
rc
.
newwanip
starting
%
s
message
:
rc
.
newwanip
starting
%
s
[
newipv6
]
command
:/
usr
/
local
/
etc
/
rc
.
newwanipv6
parameters
:%
s
type
:
script
message
:
rc
.
newwanip
starting
%
s
[
linkup
.
start
]
command
:/
usr
/
local
/
etc
/
rc
.
linkup
parameters
:
start
%
s
type
:
script
message
:
Linkup
starting
%
s
[
linkup
.
stop
]
command
:/
usr
/
local
/
etc
/
rc
.
linkup
parameters
:
stop
%
s
type
:
script
message
:
Linkup
stopping
%
s
[
carpmaster
]
command
:/
usr
/
local
/
etc
/
rc
.
carpmaster
parameters
:%
s
type
:
script
message
:
Carp
master
event
[
carpbackup
]
command
:/
usr
/
local
/
etc
/
rc
.
carpbackup
parameters
:%
s
type
:
script
message
:
Carp
backup
event
src/opnsense/service/conf/actions_service.conf
View file @
d7d1a07a
...
@@ -3,22 +3,3 @@ command:/usr/local/etc/rc.reload_all
...
@@ -3,22 +3,3 @@ command:/usr/local/etc/rc.reload_all
parameters
:
parameters
:
type
:
script
type
:
script
message
:
Reloading
all
message
:
Reloading
all
[
reload
|
restart
.
routedns
]
command
:/
usr
/
local
/
etc
/
rc
.
newroutedns
parameters
:
type
:
script
message
:
Updating
static
routes
based
on
hostnames
[
reload
|
restart
.
openvpn
]
command
:/
usr
/
local
/
etc
/
rc
.
openvpn
parameters
:%
s
type
:
script
message
:
Restarting
OpenVPN
tunnels
/
interfaces
%
s
[
reload
|
restart
.
ntpd
]
command
:/
usr
/
bin
/
killall
ntpd
; /
bin
/
sleep
3
; /
usr
/
local
/
sbin
/
ntpd
-
s
-
f
/
var
/
etc
/
ntpd
.
conf
parameters
:
type
:
script
message
:
Starting
nptd
src/sbin/ppp-linkdown
View file @
d7d1a07a
...
@@ -28,4 +28,4 @@ fi
...
@@ -28,4 +28,4 @@ fi
/bin/rm
-f
/tmp/
${
IF
}
_router
/bin/rm
-f
/tmp/
${
IF
}
_router
/bin/rm
-f
/tmp/
${
IF
}
up
/bin/rm
-f
/tmp/
${
IF
}
up
/bin/rm
-f
/tmp/
${
IF
}
_ip
/bin/rm
-f
/tmp/
${
IF
}
_ip
/usr/local/opnsense/service/configd_ctl.py
'
service reload dns
'
/usr/local/opnsense/service/configd_ctl.py
'
dns reload
'
src/sbin/ppp-linkup
View file @
d7d1a07a
...
@@ -29,7 +29,7 @@ if [ "${2}" == "inet" ]; then
...
@@ -29,7 +29,7 @@ if [ "${2}" == "inet" ]; then
echo
"
${
DNS2
}
"
>>
/var/etc/nameserver_
${
1
}
echo
"
${
DNS2
}
"
>>
/var/etc/nameserver_
${
1
}
route change
"
${
DNS2
}
"
${
4
}
route change
"
${
DNS2
}
"
${
4
}
fi
fi
/usr/local/opnsense/service/configd_ctl.py
'
service reload dns
'
/usr/local/opnsense/service/configd_ctl.py
'
dns reload
'
sleep
1
sleep
1
fi
fi
/usr/local/opnsense/service/configd_ctl.py
"interface newip
${
1
}
"
/usr/local/opnsense/service/configd_ctl.py
"interface newip
${
1
}
"
...
@@ -53,7 +53,7 @@ elif [ "${2}" == "inet6" ]; then
...
@@ -53,7 +53,7 @@ elif [ "${2}" == "inet6" ]; then
echo
"
${
DNS2
}
"
>>
/var/etc/nameserver_v6
${
1
}
echo
"
${
DNS2
}
"
>>
/var/etc/nameserver_v6
${
1
}
route change
-inet6
"
${
DNS2
}
"
${
4
}
route change
-inet6
"
${
DNS2
}
"
${
4
}
fi
fi
/usr/local/opnsense/service/configd_ctl.py
'
service reload dns
'
/usr/local/opnsense/service/configd_ctl.py
'
dns reload
'
sleep
1
sleep
1
fi
fi
/usr/local/opnsense/service/configd_ctl.py
"interface newipv6
${
1
}
"
/usr/local/opnsense/service/configd_ctl.py
"interface newipv6
${
1
}
"
...
...
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