summaryrefslogtreecommitdiff
path: root/packaging/Solaris/preremove
blob: 28e8d75c298c1cae9437065dc20a0e773379cb0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# If this is a local deinstall, stop samba
if [ -z "$PKG_INSTALL_ROOT" ]
then
	SMBD=`ps -e -o pid,comm | grep smbd | awk '{print $1}'`
	NMBD=`ps -e -o pid,comm | grep nmbd | awk '{print $1}'`
	[ ! -z "$SMBD" ] && kill $SMBD
	[ ! -z "$NMBD" ] && kill $NMBD
	sleep 2
fi