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
34bcc05b
Commit
34bcc05b
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
(cherry picked from commit
77696bd8
)
parent
fe2aa283
Changes
2
Show 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 @
34bcc05b
...
@@ -2613,6 +2613,7 @@ function services_get()
...
@@ -2613,6 +2613,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
=
array
();
$pconfig
[
'name'
]
=
"apinger"
;
$pconfig
[
'name'
]
=
"apinger"
;
$pconfig
[
'description'
]
=
gettext
(
"Gateway Monitoring Daemon"
);
$pconfig
[
'description'
]
=
gettext
(
"Gateway Monitoring Daemon"
);
$pconfig
[
'php'
][
'start'
]
=
'setup_gateways_monitor'
;
$services
[]
=
$pconfig
;
$services
[]
=
$pconfig
;
}
}
...
@@ -2649,6 +2650,7 @@ function services_get()
...
@@ -2649,6 +2650,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
=
array
();
$pconfig
[
'name'
]
=
'sshd'
;
$pconfig
[
'name'
]
=
'sshd'
;
$pconfig
[
'description'
]
=
gettext
(
'Secure Shell Daemon'
);
$pconfig
[
'description'
]
=
gettext
(
'Secure Shell Daemon'
);
$pconfig
[
'configd'
][
'start'
]
=
'sshd restart'
;
$services
[]
=
$pconfig
;
$services
[]
=
$pconfig
;
}
}
...
...
src/www/status_services.php
View file @
34bcc05b
...
@@ -90,6 +90,17 @@ function service_control_start($name, $extras)
...
@@ -90,6 +90,17 @@ function service_control_start($name, $extras)
return
sprintf
(
gettext
(
"Could not start unknown service `%s'"
),
htmlspecialchars
(
$name
));
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'
])
{
switch
(
$service
[
'name'
])
{
case
'radvd'
:
case
'radvd'
:
services_radvd_configure
();
services_radvd_configure
();
...
@@ -97,9 +108,6 @@ function service_control_start($name, $extras)
...
@@ -97,9 +108,6 @@ function service_control_start($name, $extras)
case
'ntpd'
:
case
'ntpd'
:
system_ntp_configure
();
system_ntp_configure
();
break
;
break
;
case
'apinger'
:
setup_gateways_monitor
();
break
;
case
'bsnmpd'
:
case
'bsnmpd'
:
services_snmpd_configure
();
services_snmpd_configure
();
break
;
break
;
...
@@ -127,9 +135,6 @@ function service_control_start($name, $extras)
...
@@ -127,9 +135,6 @@ function service_control_start($name, $extras)
case
'ipsec'
:
case
'ipsec'
:
vpn_ipsec_force_reload
();
vpn_ipsec_force_reload
();
break
;
break
;
case
'sshd'
:
configd_run
(
"sshd restart"
);
break
;
case
'relayd'
:
case
'relayd'
:
relayd_configure
();
relayd_configure
();
filter_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