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
77696bd8
Commit
77696bd8
authored
Feb 20, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: tracer code for start logic into service array
parent
aa8202aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
services.inc
src/etc/inc/services.inc
+2
-0
status_services.php
src/www/status_services.php
+11
-6
No files found.
src/etc/inc/services.inc
View file @
77696bd8
...
...
@@ -2606,6 +2606,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
[
'name'
]
=
"apinger"
;
$pconfig
[
'description'
]
=
gettext
(
"Gateway Monitoring Daemon"
);
$pconfig
[
'php'
][
'start'
]
=
'setup_gateways_monitor'
;
$services
[]
=
$pconfig
;
}
...
...
@@ -2642,6 +2643,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
[
'name'
]
=
'sshd'
;
$pconfig
[
'description'
]
=
gettext
(
'Secure Shell Daemon'
);
$pconfig
[
'configd'
][
'start'
]
=
'sshd restart'
;
$services
[]
=
$pconfig
;
}
...
...
src/www/status_services.php
View file @
77696bd8
...
...
@@ -90,6 +90,17 @@ function service_control_start($name, $extras)
return
sprintf
(
gettext
(
"Could not start unknown service `%s'"
),
htmlspecialchars
(
$name
));
}
if
(
isset
(
$service
[
'configd'
][
'start'
]))
{
configd_run
(
$service
[
'configd'
][
'start'
]);
/* XXX fall through later */
return
sprintf
(
gettext
(
'%s has been started via configd.'
),
htmlspecialchars
(
$name
));
}
elseif
(
isset
(
$service
[
'php'
][
'start'
]))
{
$service
[
'php'
][
'start'
]();
/* XXX fall through later */
return
sprintf
(
gettext
(
'%s has been started via php.'
),
htmlspecialchars
(
$name
));
}
/* XXX migrate all of those */
switch
(
$service
[
'name'
])
{
case
'radvd'
:
services_radvd_configure
();
...
...
@@ -97,9 +108,6 @@ function service_control_start($name, $extras)
case
'ntpd'
:
system_ntp_configure
();
break
;
case
'apinger'
:
setup_gateways_monitor
();
break
;
case
'bsnmpd'
:
services_snmpd_configure
();
break
;
...
...
@@ -127,9 +135,6 @@ function service_control_start($name, $extras)
case
'ipsec'
:
vpn_ipsec_force_reload
();
break
;
case
'sshd'
:
configd_run
(
"sshd restart"
);
break
;
case
'relayd'
:
relayd_configure
();
filter_configure
();
...
...
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