summarylogtreecommitdiffstats
path: root/ethoscope-node.install
blob: f72c68cce2059ffedee99c5b273a4d1f5ad2b813 (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
41
42
43
44
45
46
47
48
49
## arg 1:  the new package version
#pre_install() {
	# do something here
#}

# arg 1:  the new package version
post_install() {
    echo "changing the remote GIT source to local BARE created during installation"
    cd /opt/ethoscope-node
    git remote set-url origin /srv/git/ethoscope.git

    #setting branch
    git checkout python3.7
    
    echo "enabling NODE specific systemd service files"
    systemctl enable ethoscope_node.service ethoscope_update_node.service ethoscope_backup.service ethoscope_video_backup.service 
    echo "enabling the GIT server on the node"
    systemctl enable git-daemon.socket
}

## arg 1:  the new package version
## arg 2:  the old package version
#pre_upgrade() {
	# do something here
#}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    echo "changing the remote GIT source to local BARE created during installation"
    cd /opt/ethoscope-node
    git remote set-url origin /srv/git/ethoscope.git

    #setting branch
    git checkout python3.7
}

# arg 1:  the old package version
pre_remove() {
    echo "disabling systemd service files"
    systemctl disable ethoscope_node.service ethoscope_update_node.service ethoscope_backup.service ethoscope_video_backup.service
    systemctl disable git-daemon.socket

}

## arg 1:  the old package version
#post_remove() {
	# do something here
#}