-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreremove-pak.sh
41 lines (31 loc) · 921 Bytes
/
preremove-pak.sh
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
33
34
35
36
37
38
39
40
41
#!/bin/sh
set -e
cat <<BANNER
----------------------------------------------------------------------
REMOVING nginx package from system
----------------------------------------------------------------------
BANNER
case "$1" in
remove|deconfigure|remove-in-favour|deconfigure-in-favour)
if [ -x "/etc/init.d/nginx" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d nginx stop || true
else
/etc/init.d/nginx stop || true
fi
fi
rm /etc/init.d/nginx
;;
upgrade|failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
;;
esac
cat <<BANNER
----------------------------------------------------------------------
REMOVING nginx user from system
----------------------------------------------------------------------
BANNER
userdel nginx
exit 0