Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
ha
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
Administrator
ha
Commits
eeb8a35a
Commit
eeb8a35a
authored
Mar 20, 2024
by
Ahmad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
4ce6316e
Pipeline
#195
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app.js
app.js
+6
-0
No files found.
app.js
View file @
eeb8a35a
...
...
@@ -11,6 +11,7 @@ async function run() {
try
{
const
data
=
await
getTunnel
();
const
config
=
data
.
config
;
console
.
log
(
'
data getter
'
,
config
)
await
processConfig
(
config
);
}
catch
(
error
)
{
console
.
error
(
error
);
...
...
@@ -22,9 +23,14 @@ async function processConfig(newConfig) {
const
currentConfig
=
await
fs
.
readFile
(
CONFIG_PATH
,
'
utf8
'
);
if
(
currentConfig
!==
newConfig
)
{
console
.
log
(
'
config is not same try change and reload
'
)
await
fs
.
writeFile
(
CONFIG_PATH
,
newConfig
);
await
reloadHAProxy
();
}
else
{
console
.
log
(
'
config is same
'
)
}
}
catch
(
error
)
{
throw
error
;
}
...
...
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