Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openvpn-app
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cloudron
openvpn-app
Commits
7a215909
Commit
7a215909
authored
Sep 24, 2020
by
Girish Ramakrishnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move config.ini template creation to start.sh
parent
ee2e1167
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
server.js
server.js
+1
-2
start.sh
start.sh
+1
-0
No files found.
server.js
View file @
7a215909
...
...
@@ -36,8 +36,7 @@ function getConfig() {
try
{
config
=
ini
.
parse
(
fs
.
readFileSync
(
CONFIG_FILE_PATH
,
'
utf-8
'
));
}
catch
(
e
)
{
console
.
log
(
'
No config file found, creating empty one
'
);
fs
.
writeFileSync
(
CONFIG_FILE_PATH
,
'
[roles]
\n
# Restart the app and re-login for role change to take effect
\n
#admins=username1,username2
\n
'
);
console
.
log
(
'
No config file found
'
);
}
config
.
roles
=
config
.
roles
||
{};
config
.
roles
.
admins
=
config
.
roles
.
admins
||
''
;
...
...
start.sh
View file @
7a215909
...
...
@@ -31,6 +31,7 @@ echo "==> Creating CRL"
# Writing OpenVPN config
echo
"==> Generating OpenVPN config"
[[
!
-f
/app/data/openvpn.conf
]]
&&
cp
/app/code/openvpn.conf.template /app/data/openvpn.conf
[[
!
-f
/app/data/config.ini
]]
&&
echo
-e
"[roles]
\n
# Restart the app and re-login for role change to take effect
\n
#admins=username1,username2
\n
"
>
/app/data/config.ini
sed
-e
"s/^port .*/port
${
VPN_TCP_PORT
:-}
/"
\
-e
"s/^push
\"
dhcp-option DOMAIN .*
\"
/push
\"
dhcp-option DOMAIN
${
CLOUDRON_APP_DOMAIN
}
\"
/"
\
...
...
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