summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian/samba.postrm
blob: 73b2f0d0a1f82f8b080df17e523b2821271495ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

if [ "$1" = purge ]; then
	update-rc.d samba remove >/dev/null

	# Remove WINS.DAT, BROWSE.DAT and lock information file
	rm -Rf /var/samba/

	# Remove any files in the old and obsolete /var/lock/samba directory
	rm -Rf /var/lock/samba/

	# Remove files left in /etc/samba/
	rm -Rf /etc/samba/debian_config
	rm -Rf /etc/samba/MACHINE.SID

	# Remove log files
	rm -f /var/log/[ns]mb*

	# Remove NetBIOS entries from /etc/inetd.conf
	update-inetd --remove netbios-ssn
	update-inetd --remove netbios-ns
else
	# Not purging, do not remove NetBIOS entries from /etc/inetd.conf
	update-inetd --disable netbios-ssn
	update-inetd --disable netbios-ns
fi