File: preremove

package info (click to toggle)
samba 3.0.24-6etch10
  • links: PTS
  • area: main
  • in suites: etch
  • size: 49,836 kB
  • ctags: 44,390
  • sloc: ansic: 335,711; sh: 8,133; perl: 7,045; makefile: 3,107; python: 2,370; exp: 1,147; yacc: 881; awk: 486; csh: 58; sed: 45
file content (12 lines) | stat: -rw-r--r-- 292 bytes parent folder | download | duplicates (13)
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 -TERM $SMBD
	[ ! -z "$NMBD" ] && kill -TERM $NMBD
	sleep 2
fi