summarylogtreecommitdiffstats
path: root/spearmint.install
blob: 336481d7c936617fead88aae9fd8b39a911b35e4 (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() {
    groupadd -f games
    useradd -r -s /sbin/nologin -c "Spearmint Daemon user" -M -d /opt/spearmint -g games spearmint > /dev/null 2>&1
    chown -R spearmint:games /opt/spearmint

    echo '!!!'
    echo '!!! NOTE: TO PLAY SPEARMINT, YOU MUST BE PART OF THE "games" GROUP!'
    echo '!!! To play Spearmint with the Retail Version of Quake III: Arena,'
    echo '!!!  move the pak0.pk3 file from the original game CD to /opt/spearmint/baseq3/'
    echo '!!!'
    echo '!!!'
    echo '!!! When you have the .pk3 file(s) installed, you can run the game via: spearmint'
    echo '!!! See https://github.com/zturtleman/spearmint/wiki for more documentation.'
    echo '!!!'
}

post_upgrade() {
    post_install ${1}
}

post_remove() {
    #userdel -rf spearmint > /dev/null 2>&1
    userdel spearmint > /dev/null 2>&1
    if egrep -q '^games:.*:$' /etc/group;
    then
      groupdel games
    fi
    if [[ -d '/opt/spearmint' ]];
    then
    	chown -R root:root /opt/spearmint > /dev/null 2>&1
    fi
}