summarylogtreecommitdiffstats
path: root/oorexx-beta.install
blob: 477858d971b2ac9da79990cfcd74eafbc52dd7be (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
# arg 1:  the new package version
pre_install() {
  /bin/true
}

# arg 1:  the new package version
post_install() {

  orx_prefix=/usr
  data_dir=${orx_prefix}/share/ooRexx
  
  systemctl link /usr/share/ooRexx/rxapid.service
  systemctl --system daemon-reload
  systemctl start rxapid.service
  systemctl enable rxapid.service

}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
  pre_remove $1
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  post_install $1
}

# arg 1:  the old package version
pre_remove() {
  systemctl disable rxapid.service
  systemctl stop rxapid.service
  systemctl --system daemon-reload
  rm -f /etc/systemd/system/rxapid.service
  rm -f /usr/bin/rexxtry.rex
}

# arg 1:  the old package version
post_remove() {
  /bin/true
}

op=$1
shift
$op $*