Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ef9c1f23
Commit
ef9c1f23
authored
Oct 26, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup k3s-killall
parent
33f6a4e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
install.sh
install.sh
+16
-5
No files found.
install.sh
View file @
ef9c1f23
...
...
@@ -437,13 +437,14 @@ create_killall() {
info
"Creating killall script
${
BIN_DIR
}
/
${
KILLALL_K3S_SH
}
"
$SUDO
tee
${
BIN_DIR
}
/
${
KILLALL_K3S_SH
}
>
/dev/null
<<
\
EOF
#!/bin/sh
set -x
[
$(
id
-u
)
-eq 0 ] || exec sudo
$0
$@
for bin in /var/lib/rancher/k3s/data/**/bin/; do
[ -d
$bin
] && export PATH=
$bin
:
$PATH
done
set -x
for service in /etc/systemd/system/k3s*.service; do
[ -s
$service
] && systemctl stop
$(
basename
$service
)
done
...
...
@@ -452,18 +453,28 @@ for service in /etc/init.d/k3s*; do
[ -x
$service
] &&
$service
stop
done
pschildren() {
ps -e -o ppid= -o pid= | \
sed -e 's/^\s*//g; s/\s\s*/\t/g;' | \
grep -w "^
$1
" | \
cut -f2
}
pstree() {
for pid in
$@
; do
echo
$pid
# Find and show pstree for child processes of
$pid
ps -o ppid= -o pid= | while read parent child; do
[
$parent
-ne
$pid
] || pstree
$child
for child in
$(
pschildren
$pid
)
; do
pstree
$child
done
done
}
killtree() {
kill -9
$(
{
set
+x
;
}
2>/dev/null
;
pstree
$@
;
set
-x
)
2>/dev/null
kill -9
$(
{
set
+x
;
}
2>/dev/null
;
pstree
$@
;
set
-x
;
)
2>/dev/null
}
getshims() {
...
...
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