summaryrefslogtreecommitdiffstats
path: root/debian/tests/systemd
blob: 48afbf556936d7d652290bd611982ded29630e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

echo "Checking whether dovecot.service is enabled"
systemctl is-enabled dovecot.service

echo "Checking whether dovecot.service is a native unit"
source=$(systemctl show -pSourcePath dovecot.service | cut -d = -f 2)
if [ -n "$source" ]; then
	echo $source
	exit 1
else
	echo "OK (no SourcePath found)"
fi

echo "Checking whether dovecot.socket is inactive"
status=$(systemctl show -pActiveState dovecot.socket | cut -d = -f 2)
echo $status
if [ "$status" != inactive ]; then
	exit 1
fi