summarylogtreecommitdiffstats
path: root/freenet.install
blob: c1f2ea9743ad43561e9eadbbcfe8f466936337ec (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
33
34
35
post_install() {
  getent passwd freenet &>/dev/null || {
        echo -n ">>> Creating freenet system user... "
        useradd --system \
                --user-group \
                --home /opt/freenet \
                freenet &&
        echo "ok" || echo "fail"
    }
    chown -R freenet:freenet /opt/freenet /run/freenet
    echo
    echo "Freenet will be slow at first startup while it discovers the network."
    echo "You may see Data Not Found or Route Not Found errors, this is normal."
    echo "For best performance Freenet should be run 24/7 as much as possible."
    echo "Your node's configuration WebUI will be located at http://127.0.0.1:8888/ "
    echo " https://freenetproject.org/faq.html"
    echo
}

post_upgrade() {
    chown -R freenet:freenet /opt/freenet /run/freenet
    echo
    echo " Freenet WebUI http://127.0.0.1:8888/ "
    echo "     Changelog https://github.com/freenet/fred/releases/tag/build01469"
    echo
}

pre_remove() {
    getent passwd freenet &>/dev/null && {
        echo -n ">>> Removing freenet system user... "
        userdel freenet
        echo "ok"
        echo
    }
}