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
f54cf1cc
Commit
f54cf1cc
authored
Feb 20, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: design service commands as arrays by default
(cherry picked from commit
4d3ac63a
)
parent
34bcc05b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
services.inc
src/etc/inc/services.inc
+2
-2
status_services.php
src/www/status_services.php
+6
-2
No files found.
src/etc/inc/services.inc
View file @
f54cf1cc
...
...
@@ -2613,7 +2613,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
[
'name'
]
=
"apinger"
;
$pconfig
[
'description'
]
=
gettext
(
"Gateway Monitoring Daemon"
);
$pconfig
[
'php'
][
'start'
]
=
'setup_gateways_monitor'
;
$pconfig
[
'php'
][
'start'
]
=
array
(
'setup_gateways_monitor'
)
;
$services
[]
=
$pconfig
;
}
...
...
@@ -2650,7 +2650,7 @@ function services_get()
$pconfig
=
array
();
$pconfig
[
'name'
]
=
'sshd'
;
$pconfig
[
'description'
]
=
gettext
(
'Secure Shell Daemon'
);
$pconfig
[
'configd'
][
'start'
]
=
'sshd restart'
;
$pconfig
[
'configd'
][
'start'
]
=
array
(
'sshd restart'
)
;
$services
[]
=
$pconfig
;
}
...
...
src/www/status_services.php
View file @
f54cf1cc
...
...
@@ -91,11 +91,15 @@ function service_control_start($name, $extras)
}
if
(
isset
(
$service
[
'configd'
][
'start'
]))
{
configd_run
(
$service
[
'configd'
][
'start'
]);
foreach
(
$service
[
'configd'
][
'start'
]
as
$cmd
)
{
configd_run
(
$cmd
);
}
/* XXX fall through later */
return
sprintf
(
gettext
(
'%s has been started via configd.'
),
htmlspecialchars
(
$name
));
}
elseif
(
isset
(
$service
[
'php'
][
'start'
]))
{
$service
[
'php'
][
'start'
]();
foreach
(
$service
[
'php'
][
'start'
]
as
$cmd
)
{
$cmd
();
}
/* XXX fall through later */
return
sprintf
(
gettext
(
'%s has been started via php.'
),
htmlspecialchars
(
$name
));
}
...
...
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