DocSpace-client/build/install/deb/debian/product-common.postinst
Evgeniy Antonyuk 66ed2b6372
Bugfix/lintian error (#1158)
* Correction of systemd-service-file-references-to-obsolete-target error

* Correction of the changelog format

* Correction of package-uses-deprecated-debhelper-compat-version

* Correction of maintainer-script-needs-depends-on-adduser

* Correction of missing-debconf-dependency

* Correction of extended-description-is-probably-too-short

* Correction of various license format errors

* Correction of maintainer-script-lacks-home-in-adduser error

* Correction of duplicate-updaterc.d-calls-in-postinst error

* Correction of init.d-script-not-included-in-package error

* Correction of the error of missing the onlyoffice-login.conf file

* Correction of binary-from-other-architecture error

* Correction of missing-debian-source-format error

* Temporarily correct descriptions

* Correction of debhelper-but-no-misc-depends error

* Correct of missing-dependency-on-line error

* Correct of unstripped-binary-or-object error

* Correct of maintainer-script-lacks-debhelper-token error

* Change templates description

* Correction of untranslatable-debconf-templates error

* Fix configuration according to po-debconf recommendations

* Fix configuration according to po-debconf recommendations

* Fix condition for detecting existence of file

* Correct of script-with-language-extension error

* Correct of script-with-language-extension error

* Remove linux-arm runtimes packaging

* Add lintian-overrides

* Fix lintian-overrides creation condition

* Fix lintian-overrides creation condition

* Add overrides for the main package

* Add ignoring untranslatable-debconf-templates errors

* Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file

* Correction of node_modules error output

* Fix backup-file-in-package and macos-ds-store-file-in-package errors

* Add a override of the unusual-interpreter error

* Fix removing files that cause errors
2023-02-01 13:06:03 +05:00

24 lines
579 B
Bash

#!/bin/bash
#
# see: dh_installdeb(1)
set -e
if ! cat /etc/passwd | grep -q "onlyoffice:"; then
adduser --quiet --home /var/www/{{product}} --system --group onlyoffice
fi
if ! cat /etc/group | grep -q "nginx:"; then
addgroup --quiet --system nginx
fi
if ! cat /etc/passwd | grep -q "nginx:"; then
adduser --quiet -g nginx --no-create-home --home /nonexistent --system nginx
usermod -aG nginx nginx
fi
usermod -aG onlyoffice,nginx onlyoffice
chown -R onlyoffice:onlyoffice /var/log/onlyoffice/{{product}} /var/www/{{product}} /etc/onlyoffice/{{product}}
#DEBHELPER#