Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gdut-drcom
Commits
d0b88095
Commit
d0b88095
authored
Oct 05, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up luci apply
parent
17e2d1fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
src/root/etc/init.d/gdut-drcom
src/root/etc/init.d/gdut-drcom
+10
-3
src/root/usr/lib/lua/luci/model/cbi/gdut-drcom.lua
src/root/usr/lib/lua/luci/model/cbi/gdut-drcom.lua
+1
-1
No files found.
src/root/etc/init.d/gdut-drcom
View file @
d0b88095
...
@@ -3,8 +3,15 @@
...
@@ -3,8 +3,15 @@
START
=
99
START
=
99
start
()
{
start
()
{
remote_ip
=
$(
uci get gdut_drcom.@gdut_drcom[0].remote_ip
)
remote_ip
=
$(
uci get gdut_drcom.@gdut_drcom[0].remote_ip 2>/dev/null
)
keep_alive1_flag
=
$(
uci get gdut_drcom.@gdut_drcom[0].keep_alive1_flag
)
keep_alive1_flag
=
$(
uci get gdut_drcom.@gdut_drcom[0].keep_alive1_flag 2>/dev/null
)
enable
=
$(
uci get gdut_drcom.@gdut_drcom[0].enable 2>/dev/null
)
if
[
"
$enable
"
x
=
"1"
x
]
;
then
/etc/init.d/gdut-drcom
enable
else
/etc/init.d/gdut-drcom disable
return
fi
cmd
=
"service_start /usr/bin/gdut-drcom -c /etc/gdut-drcom.conf "
cmd
=
"service_start /usr/bin/gdut-drcom -c /etc/gdut-drcom.conf "
if
[
-n
"
$remote_ip
"
]
;
then
if
[
-n
"
$remote_ip
"
]
;
then
...
@@ -17,8 +24,8 @@ start() {
...
@@ -17,8 +24,8 @@ start() {
eval
$cmd
eval
$cmd
}
}
stop
()
stop
()
{
{
service_stop /usr/bin/gdut-drcom
service_stop /usr/bin/gdut-drcom
return
0
}
}
src/root/usr/lib/lua/luci/model/cbi/gdut-drcom.lua
View file @
d0b88095
...
@@ -24,7 +24,7 @@ keep_alive_flag = s:option(Value, "keep_alive1_flag", translate("Keep alive1 fla
...
@@ -24,7 +24,7 @@ keep_alive_flag = s:option(Value, "keep_alive1_flag", translate("Keep alive1 fla
local
apply
=
luci
.
http
.
formvalue
(
"cbi.apply"
)
local
apply
=
luci
.
http
.
formvalue
(
"cbi.apply"
)
if
apply
then
if
apply
then
io.popen
(
"
echo gdut-drcom apply >> /root/gdut-drcom.log
"
)
io.popen
(
"
/etc/init.d/gdut-drcom restart
"
)
end
end
return
m
return
m
...
...
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