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
7790bf4c
Commit
7790bf4c
authored
Feb 21, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: align openvpn stop
(cherry picked from commit
d9810025
)
parent
11c82822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
status_services.php
src/www/status_services.php
+8
-11
No files found.
src/www/status_services.php
View file @
7790bf4c
...
...
@@ -117,23 +117,20 @@ function service_control_start($name, $extras)
function
service_control_stop
(
$name
,
$extras
)
{
$msg
=
sprintf
(
gettext
(
"%s has been stopped."
),
htmlspecialchars
(
$name
));
$filter
=
array
();
/* XXX openvpn is handled special at the moment */
if
(
$name
==
'openvpn'
)
{
$vpnmode
=
htmlspecialchars
(
$extras
[
'vpnmode'
]);
if
((
$vpnmode
==
"server"
)
or
(
$vpnmode
==
"client"
))
{
$id
=
htmlspecialchars
(
$extras
[
'id'
]);
$pidfile
=
"/var/run/openvpn_
{
$vpnmode
}{
$id
}
.pid"
;
killbypid
(
$pidfile
);
}
return
$msg
;
/* XXX extra argument is extra tricky */
}
else
if
(
$name
==
'miniupnpd'
)
{
if
(
$name
==
'miniupnpd'
)
{
upnp_action
(
'stop'
);
return
$msg
;
}
$service
=
find_service_by_name
(
$name
);
if
(
$name
==
'openvpn'
)
{
$filter
[
'mode'
]
=
$extras
[
'vpnmode'
];
/* XXX I think mode is spurious */
$filter
[
'vpnid'
]
=
$extras
[
'id'
];
}
$service
=
find_service_by_name
(
$name
,
$filter
);
if
(
!
isset
(
$service
[
'name'
]))
{
return
sprintf
(
gettext
(
"Could not stop unknown service `%s'"
),
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