Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rabbitmq_agents
Manage
Activity
Members
Labels
Plan
Issues
16
Issue boards
Milestones
Wiki
Code
Merge requests
8
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
rabbitmq_agents
Commits
ada257b7
Commit
ada257b7
authored
4 years ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
kill nginx process running under user from login node
parent
55f85bc5
No related branches found
No related tags found
2 merge requests
!85
kill nginx process running under user from login node
,
!86
kill nginx process running under user from login node
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
remove_user_login_node.sh
+21
-0
21 additions, 0 deletions
remove_user_login_node.sh
with
21 additions
and
0 deletions
remove_user_login_node.sh
0 → 100644
+
21
−
0
View file @
ada257b7
#!/bin/sh
username
=
"
$1
"
usage
()
{
echo
"Usage:
$0
USERNAME"
}
if
[[
"
$EUID
"
-ne
0
]]
;
then
echo
"This script must be run as root!"
exit
1
fi
if
[
-z
"
$username
"
]
;
then
usage
exit
1
fi
if
id
"
$username
"
&>/dev/null
;
then
echo
"Deleting nginx process running under user:
${
username
}
"
kill
-9
`
ps
-ef
|
grep
'nginx'
|
grep
${
username
}
|
awk
'{print $2}'
`
echo
"Deleted process"
else
echo
"user:
${
username
}
not found."
exit
1
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