Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Libraries
nghttp2
Commits
1e96a2d3
Commit
1e96a2d3
authored
Sep 24, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rraptorr-init-upgrade'
parents
b7fd0fdd
4a5d1b67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
40 deletions
+31
-40
contrib/nghttpx-init.in
contrib/nghttpx-init.in
+31
-40
No files found.
contrib/nghttpx-init.in
View file @
1e96a2d3
...
...
@@ -83,19 +83,6 @@ do_stop()
return
"
$RETVAL
"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload
()
{
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon
--stop
--signal
1
--quiet
--pidfile
$PIDFILE
--name
$NAME
return
0
}
case
"
$1
"
in
start
)
[
"
$VERBOSE
"
!=
no
]
&&
log_daemon_msg
"Starting
$DESC
"
"
$NAME
"
...
...
@@ -117,31 +104,35 @@ case "$1" in
status_of_proc
"
$DAEMON
"
"
$NAME
"
&&
exit
0
||
exit
$?
;;
upgrade
)
log_daemon_msg
"Upgrade
$DESC
"
"
$NAME
"
pid
=
`
pidofproc
-p
$PIDFILE
$NAME
`
log_daemon_msg
"Upgrading
$DESC
"
"
$NAME
"
old
pid
=
`
pidofproc
-p
$PIDFILE
$NAME
`
case
"
$?
"
in
0
)
echo
"Sending USR2 signal to
$pid
"
kill
-USR2
$pid
echo
"Waiting for new binary..."
sleep
5
echo
"Sending QUIT signal to
$pid
"
kill
-QUIT
$pid
0
)
log_progress_msg
"Sending SIGUSR2 to
$oldpid
..."
kill
-USR2
$oldpid
log_progress_msg
"Waiting for new binary..."
for
i
in
1 2 3 4 5
;
do
sleep
1
newpid
=
`
pidofproc
-p
$PIDFILE
$NAME
`
if
[
"
$newpid
"
!=
"
$oldpid
"
]
;
then
break
fi
done
if
[
"
$newpid
"
!=
"
$oldpid
"
]
;
then
log_progress_msg
"Sending SIGQUIT to
$oldpid
..."
kill
-QUIT
$oldpid
log_end_msg 0
else
log_progress_msg
"New binary failed to start"
log_end_msg 1
fi
;;
*
)
echo
"pidofproc() failed"
*
)
log_progress_msg
"pidofproc() failed"
log_end_msg 1
;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload
)
#
# If the "reload" option is implemented then remove the
...
...
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