diff options
Diffstat (limited to 'packaging/Solaris/preremove')
-rw-r--r-- | packaging/Solaris/preremove | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packaging/Solaris/preremove b/packaging/Solaris/preremove new file mode 100644 index 0000000000..28e8d75c29 --- /dev/null +++ b/packaging/Solaris/preremove @@ -0,0 +1,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 + |