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
6f19276d
Commit
6f19276d
authored
Mar 21, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vpn: kill config dirs consistently
parent
fc381754
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
vpn.inc
src/etc/inc/plugins.inc.d/vpn.inc
+13
-13
No files found.
src/etc/inc/plugins.inc.d/vpn.inc
View file @
6f19276d
...
...
@@ -35,7 +35,7 @@ function vpn_configure()
return
array
(
'vpn_pptpd_configure'
,
'vpn_pppoes_configure'
,
'vpn_l2tp_configure'
'vpn_l2tp_configure'
,
);
}
...
...
@@ -111,6 +111,7 @@ function vpn_pptpd_configure()
$pptpdcfg
=
$config
[
'pptpd'
];
killbypid
(
'/var/run/pptp-vpn.pid'
,
'TERM'
,
true
);
mwexec
(
'rm -rf /var/etc/pptp-vpn'
);
if
(
!
isset
(
$pptpdcfg
[
'mode'
])
||
$pptpdcfg
[
'mode'
]
==
'off'
)
{
return
0
;
...
...
@@ -125,7 +126,6 @@ function vpn_pptpd_configure()
return
;
}
mwexec
(
'rm -rf /var/etc/pptp-vpn'
);
mkdir
(
'/var/etc/pptp-vpn'
);
switch
(
$pptpdcfg
[
'mode'
])
{
...
...
@@ -331,6 +331,7 @@ function vpn_pppoe_configure(&$pppoecfg)
$syscfg
=
$config
[
'system'
];
killbypid
(
"/var/run/pppoe
{
$pppoecfg
[
'pppoeid'
]
}
-vpn.pid"
,
'TERM'
,
true
);
mwexec
(
"rm -rf /var/etc/pppoe
{
$pppoecfg
[
'pppoeid'
]
}
-vpn"
);
if
(
!
isset
(
$pppoecfg
[
'mode'
])
||
$pppoecfg
[
'mode'
]
==
'off'
)
{
return
0
;
...
...
@@ -340,12 +341,10 @@ function vpn_pppoe_configure(&$pppoecfg)
echo
gettext
(
"Configuring PPPoE VPN service..."
);
}
switch
(
$pppoecfg
[
'mode'
])
{
mkdir
(
"/var/etc/pppoe
{
$pppoecfg
[
'pppoeid'
]
}
-vpn"
);
switch
(
$pppoecfg
[
'mode'
])
{
case
'server'
:
/* create directory if it does not exist */
@
mkdir
(
"/var/etc/pppoe
{
$pppoecfg
[
'pppoeid'
]
}
-vpn"
);
$pppoe_interface
=
get_real_interface
(
$pppoecfg
[
'interface'
]);
if
(
$pppoecfg
[
'paporchap'
]
==
"chap"
)
{
...
...
@@ -537,6 +536,7 @@ function vpn_l2tp_configure()
global
$config
;
killbypid
(
'/var/run/l2tp-vpn.pid'
,
'TERM'
,
true
);
mwexec
(
'rm -rf /var/etc/l2tp-vpn'
);
$syscfg
=
$config
[
'system'
];
if
(
isset
(
$config
[
'l2tp'
]))
{
...
...
@@ -553,7 +553,7 @@ function vpn_l2tp_configure()
echo
gettext
(
'Configuring L2TP VPN service...'
);
}
@
mkdir
(
'/var/etc/l2tp-vpn'
);
mkdir
(
'/var/etc/l2tp-vpn'
);
switch
(
isset
(
$l2tpcfg
[
'mode'
])
?
$l2tpcfg
[
'mode'
]
:
null
)
{
...
...
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