summarylogtreecommitdiffstats
path: root/cellframe-node.install
blob: aa3f7867c16ee15c306c235aa9a79eb69d76de1b (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
36
37
38
39
40
_showmsg() {
BOLD=$(tput bold)
NORMAL=$(tput sgr0)

echo -e "
${BOLD}NODE CONFIGURATION FILES${NORMAL}

    By default, no configuration files are provided. For enabling sane default configuration, run:

    ${BOLD}cellframe-node-config -i /opt/cellframe-node/share/default.setup${NORMAL}
    
${BOLD}STARTING CELLFRAME NODE${NORMAL}

    Use the provided systemd unit file and launch node with cellframe-node-config tool:

    ${BOLD}sudo cellframe-node-config -e service enable${NORMAL}
    ${BOLD}sudo cellframe-node-config -e service start${NORMAL}
    
${BOLD}RUNNING A MASTERNODE${NORMAL}

    View the prerequisites and instructions at:

    ${BOLD}https://wiki.cellframe.net/02.+Learn/Cellframe+Node/Master+Node+Manual+Setup${NORMAL}\n"
}

post_install() {
    _showmsg
}

post_upgrade() {
    systemctl daemon-reload
    systemctl is-active --quiet cellframe-node.service && systemctl restart cellframe-node.service
}

pre_remove() {
    systemctl is-active --quiet cellframe-node.service \
    && systemctl stop cellframe-node.service \
    && systemctl disable cellframe-node.service
    systemctl daemon-reload
}