Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pavel Valach
Warden
Commits
d70066a6
Commit
d70066a6
authored
13 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
uprava funkce force-stop
parent
69d64148
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/warden-server/bin/wardend
+9
-12
9 additions, 12 deletions
src/warden-server/bin/wardend
with
9 additions
and
12 deletions
src/warden-server/bin/wardend
+
9
−
12
View file @
d70066a6
...
...
@@ -63,7 +63,7 @@ usage() {
}
check_status
()
{
/bin/ps axo pid,comm |
grep
-q
"warden-serv
er
*"
;
RET_VAL
=
`
echo
$?
`
/bin/ps axo pid,comm |
grep
-q
"warden-serv*"
;
RET_VAL
=
`
echo
$?
`
if
[
$RET_VAL
-eq
0
]
;
then
STATUS
=
1
# true - warden is running
else
...
...
@@ -72,7 +72,7 @@ check_status() {
}
get_pid
()
{
PID
=
`
ps axo pid,comm |
grep
"warden-serv
er
*"
|
sed
's/^ \{1,4\}//g'
|
cut
-f
1
-d
" "
`
PID
=
`
ps axo pid,comm |
grep
"warden-serv*"
|
sed
's/^ \{1,4\}//g'
|
cut
-f
1
-d
" "
`
return
$PID
}
...
...
@@ -120,17 +120,14 @@ warden_status() {
}
warden_force_stop
()
{
check_status
if
[
$STATUS
-eq
1
]
;
then
logger
-s
"Force stopping Warden server daemon ..."
get_pid PID
kill
-9
$PID
if
[
-e
$PID_FILE
]
;
then
rm
-f
$PID_FILE
fi
logger
-s
"Force stopping Warden server daemon ..."
get_pid PID
kill
-9
$PID
1>/dev/null 2>&1
if
[
-e
$PID_FILE
]
;
then
rm
-f
$PID_FILE
fi
if
[
-e
$LOCK_FILE
]
;
then
rm
-f
$LOCK_FILE
else
echo
"Warden daemon is NOT running."
fi
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment