mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-12-27 12:30:11 +01:00
26 lines
655 B
Bash
26 lines
655 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
cat > /usr/local/bin/ods-apt-pre-hook << DFOE
|
||
|
#!/bin/bash
|
||
|
rm /etc/nginx/conf.d/ds-ssl.conf
|
||
|
systemctl stop nginx.service
|
||
|
DFOE
|
||
|
chmod +x /usr/local/bin/ods-apt-pre-hook
|
||
|
|
||
|
cat > /usr/local/bin/ods-apt-post-hook << DFOE
|
||
|
#!/bin/bash
|
||
|
rm /etc/nginx/conf.d/ds.conf
|
||
|
ln -sf /etc/onlyoffice/documentserver/nginx/ds-ssl.conf /etc/nginx/conf.d/ds-ssl.conf
|
||
|
systemctl restart nginx
|
||
|
DFOE
|
||
|
chmod +x /usr/local/bin/ods-apt-post-hook
|
||
|
|
||
|
|
||
|
cat << EOF > /etc/apt/apt.conf.d/80-ods-apt-pre-hook
|
||
|
DPkg::Pre-Invoke {"/usr/local/bin/ods-apt-pre-hook";};
|
||
|
EOF
|
||
|
|
||
|
cat << EOF > /etc/apt/apt.conf.d/80-ods-apt-post-hook
|
||
|
DPkg::Post-Invoke {"/usr/local/bin/ods-apt-post-hook";};
|
||
|
EOF
|