summarylogtreecommitdiffstats
path: root/warsaw-openrc.install
blob: 1ec956883159fb6b75d1c123b22f986eab46301d (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
post_install() {
  echo "To use Warsaw, start its service using:"
  echo "systemd: # systemctl start warsaw"
  echo "openrc: # rc-service warsaw stop"

  for i in ld-linux-x86-64.so.2 libc.so.6 libdl.so.2 libpthread.so.0; do
      sudo chattr -V +i /usr/local/lib/warsaw/$i
  done

}

pre_remove() {
    if (pacman -Q openrc &> /dev/null); then
        rc-service warsaw stop
    else
        systemctl stop warsaw
    fi

    for i in ld-linux-x86-64.so.2 libc.so.6 libdl.so.2 libpthread.so.0; do
        sudo chattr -V -i /usr/local/lib/warsaw/$i
    done
}

post_upgrade() {
    post_install
}

pre_upgrade() {
    pre_remove
}