Skip to content

Commit f2b9340

Browse files
committed
Update postinst
1 parent c2dc80e commit f2b9340

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.debpkg/DEBIAN/postinst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/bash
22
echo "disabling samba daemons..."
3-
systemctl disable samba
4-
systemctl disable smbd
5-
systemctl disable nmbd
6-
systemctl disable winbind
3+
services=("samba" "smbd" "nmbd" "winbind")
4+
5+
for service in "${services[@]}"; do
6+
if systemctl is-active --quiet "$service"; then
7+
echo "$service is active -> stopping and disabling..."
8+
systemctl stop "$service"
9+
systemctl disable "$service"
10+
else
11+
echo "$service is not active -> skipping."
12+
fi
13+
done

0 commit comments

Comments
 (0)