summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 6dbc1b82..4215880b 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -287,13 +287,17 @@ for i in $PBUIDS ; do
AGE=$(ps -p $p -o etimes= || echo 0)
# let's be generous and consider 14 hours here...
if [ $AGE -gt $(( 14*60*60 )) ] ; then
- PSCALL=${PSCALL:+"$PSCALL,"}"$p"
- echo "Warning: Could 'kill -9 $p' now, but not doing so now _yet_... "
+ sudo kill -9 $p 2>&1 || (echo "Could not kill:" ; ps -F -p "$p")
+ # check it's gone
+ AGE=$(ps -p $p -o etimes= || echo 0)
+ if [ $AGE -gt $(( 14*60*60 )) ] ; then
+ PSCALL=${PSCALL:+"$PSCALL,"}"$p"
+ fi
fi
done
done
if [ ! -z "$PSCALL" ] ; then
- echo -e "Warning: processes found which should not be there, please fix up manually:"
+ echo -e "Warning: processes found which should not be there and which could not be killed. Please fix up manually:"
ps -F -p "$PSCALL"
echo
fi