summarylogtreecommitdiffstats
path: root/collabora-online-server-git.install
blob: 778c702858d5ffdcbc25ac6fe020b28d9f145868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_install() {
    getent passwd cool >/dev/null || useradd -M -d /var/lib/coolwsd -s /usr/bin/nologin cool
    chown -R cool:cool /var/lib/coolwsd
    chown -R cool:cool /usr/share/coolwsd
    chown -R cool:cool /etc/coolwsd
    setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
    setcap cap_sys_admin=ep /usr/bin/coolmount
    sudo -u cool coolwsd-systemplate-setup /var/lib/coolwsd/systemplate /usr/share/coolwsd/instdir 1>/dev/null
    sudo -u cool coolwsd-generate-proof-key /etc/coolwsd 1>/dev/null
}
post_upgrade() {
    chown -R cool:cool /var/lib/coolwsd
    chown -R cool:cool /usr/share/coolwsd
    chown -R cool:cool /etc/coolwsd
    setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
    setcap cap_sys_admin=ep /usr/bin/coolmount
    sudo -u cool coolwsd-systemplate-setup /var/lib/coolwsd/systemplate /usr/share/coolwsd/instdir 1>/dev/null
}