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
98717224
Commit
98717224
authored
Mar 10, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configd rc script fixes
parent
14359727
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
configd
src/etc/rc.d/configd
+40
-2
No files found.
src/etc/rc.d/configd
View file @
98717224
...
...
@@ -12,7 +12,9 @@
name
=
configd
stop_precmd
=
configd_prestop
start_precmd
=
configd_prestart
start_postcmd
=
configd_poststart
stop_cmd
=
configd_stop
stop_postcmd
=
configd_poststop
configd_load_rc_config
()
...
...
@@ -25,11 +27,47 @@ configd_load_rc_config()
command_interpreter
=
/usr/local/bin/python2.7
}
#
configd_prestart
()
{
# reset access rights on configd daemon script
chmod
700 /usr/local/opnsense/service/configd.py
}
#
configd_poststart
()
{
# give the daemon some time to initilize it's configuration
sleep
1
}
# kill configd
configd_
pre
stop
()
configd_stop
()
{
if
[
-z
"
$rc_pid
"
]
;
then
[
-n
"
$rc_fast
"
]
&&
return
0
_run_rc_notrunning
return
1
fi
echo
-n
"Stopping
${
name
}
."
# first ask gently to exit
kill
-15
${
rc_pid
}
# wait max 2 seconds for gentle exit
for
i
in
$(
seq
1 20
)
;
do
if
[
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
break
fi
sleep
0.1
done
# kill if it's still running
if
[
!
-z
"
`
/bin/ps
-ex
| /usr/bin/awk
'{print $1;}'
| /usr/bin/grep
"^
${
rc_pid
}
"
`
"
]
;
then
kill
-9
${
rc_pid
}
fi
echo
"..done"
}
# cleanup after stopping configd
...
...
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