blob: 8707dae544d3c172b61b234f80765f3fefacba01 (
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
27
28
29
30
31
32
|
post_install() {
getent group amule &>/dev/null || groupadd -r -g 129 amule >/dev/null
getent passwd amule &>/dev/null || useradd -r -u 129 -g amule -d /var/lib/amule -s /bin/false -c amule amule >/dev/null
systemd-tmpfiles --create amuled.conf
echo "=> amuled files stored in /var/lib/amule"
echo "see https://wiki.archlinux.org/index.php/AMule to configure"
}
post_upgrade() {
post_install
}
post_remove() {
getent passwd amule &>/dev/null && userdel amule
getent group amule &>/dev/null && groupdel amule
true
paths=(/var/lib/amule)
first=true
for path in ${paths[@]}; do
if [ -d $path ]; then
if $first; then
first=false
echo "==> Leftover Paths:"
fi
echo "==> $path"
fi
done
}
|