aboutsummaryrefslogtreecommitdiffstats
path: root/games/minecraft-server/files/pkg-deinstall.in
blob: 24ab45a267a1de4013f7bcf238a653009b4f970c (plain) (blame)
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 [ "$2" != "POST-DEINSTALL" ]; then
    exit 0
fi

if [ -d %%DATADIR%% ]; then
        echo "There are some files (like your world and your server.log)"
        echo "left in %%DATADIR%%."
        echo "Use 'rm -rf %%DATADIR%%' to delete them."
        echo
fi

if [ -d %%ETCDIR%% ]; then
        echo "There are some changed config files left in %%ETCDIR%%."
        echo "Use 'rm -rf %%ETCDIR%%' to delete them."
        echo
fi
USER=%%MC_USER%%

if pw usershow "${USER}" 2>/dev/null 1>&2; then
        echo "To delete ${USER} user permanently, use 'rmuser ${USER}'"
fi

exit 0