Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ffbs
ffbs-gluon
Commits
b016cf18
Unverified
Commit
b016cf18
authored
8 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-mesh-vpn-core: add code for migration of enabled state between fastd and tunneldigger
Based-on-patch-by:
Cyrus Fox
<
cyrus@lambdacore.de
>
parent
a49ef70c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/400-mesh-vpn
+16
-0
16 additions, 0 deletions
...gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/400-mesh-vpn
with
16 additions
and
0 deletions
package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/400-mesh-vpn
+
16
−
0
View file @
b016cf18
...
...
@@ -58,3 +58,19 @@ uci:section('firewall', 'include', 'mesh_vpn_dns', {
})
uci
:
save
(
'firewall'
)
-- VPN migration
local
has_fastd
=
fs
.
access
(
'/lib/gluon/mesh-vpn/fastd'
)
local
fastd_enabled
=
has_fastd
and
uci
:
get_bool
(
"fastd"
,
"mesh_vpn"
,
"enabled"
)
local
has_tunneldigger
=
fs
.
access
(
'/lib/gluon/mesh-vpn/tunneldigger'
)
local
tunneldigger_enabled
=
has_fastd
and
uci
:
get_bool
(
"tunneldigger"
,
"mesh_vpn"
,
"enabled"
)
local
enabled
=
fastd_enabled
or
tunneldigger_enabled
or
false
uci
:
set
(
"fastd"
,
"mesh_vpn"
,
"enabled"
,
has_fastd
and
enabled
)
uci
:
save
(
"fastd"
)
uci
:
set
(
"tunneldigger"
,
"mesh_vpn"
,
"enabled"
,
has_tunneldigger
and
enabled
)
uci
:
save
(
"tunneldigger"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment