mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
e1dfd7e3ba
* nautilus-clean.sh: Simple shell script to check if any of the auxiliary processes nautilus might launch are still running, and if so, report which ones and kill them. Total hack for dev/testing use only; should not be distributed.
36 lines
894 B
Bash
Executable file
36 lines
894 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# This is a quick hack to check if any nautilus auxiliary processes
|
|
# are running, and if so, list them and kill them. It is not
|
|
# portable, and should be be expected to be used in any kind of
|
|
# production capacity.
|
|
|
|
|
|
# Add any new auxiliary programs here.
|
|
AUX_PROGS="hyperbola ntl-history-view ntl-notes ntl-web-search ntl-web-browser nautilus-sample-content-view bonobo-text-plain bonobo-image-generic gnome-vfs-slave";
|
|
|
|
unset FOUND_ANY;
|
|
|
|
for NAME in $AUX_PROGS; do
|
|
|
|
EGREP_PATTERN=`echo $NAME | sed -e 's/\(.\)\(.*\)/[\1]\2/' | sed -e 's/\[\\\^\]/\[\\^\]/'`;
|
|
|
|
COUNT=`ps auxww | egrep $EGREP_PATTERN | wc -l`;
|
|
|
|
if [ $COUNT -gt 0 ]; then
|
|
if [ -z $FOUND_ANY ]; then
|
|
echo "Stale Processes Found";
|
|
FOUND_ANY=true;
|
|
fi
|
|
echo "$NAME: $COUNT";
|
|
killall "$NAME";
|
|
fi
|
|
done
|
|
|
|
|
|
if [ -z $FOUND_ANY ]; then
|
|
echo "No Stale Processes Found";
|
|
exit 0;
|
|
fi
|
|
|
|
exit -1;
|