#!/bin/sh set -e # Source debconf library. . /usr/share/debconf/confmodule # Due to a change in sudo, now it runs PAM modules even on password-less # invocations. This leads to plinth not being able to run root privileges. This # is because of our own restrictions in /etc/security/access.conf. Since Plinth # is locked out after upgrade, we need to do this in postinst. sed -i 's+-:ALL EXCEPT root fbx (admin) (sudo):ALL+-:ALL EXCEPT root fbx plinth (admin) (sudo):ALL+' /etc/security/access.conf case "$1" in configure) if ! getent group plinth >/dev/null; then addgroup --system --quiet plinth fi if ! getent passwd plinth >/dev/null; then adduser --system --quiet --ingroup plinth --no-create-home --home /var/lib/plinth plinth fi chown plinth: /var/lib/plinth chown plinth: /var/lib/plinth/sessions if [ ! -e '/var/lib/freedombox/is-freedombox-disk-image' ]; then umask 377 base64 < /dev/urandom | head -c 16 | sed -e 's+$+\n+' > /var/lib/plinth/firstboot-wizard-secret chown plinth:plinth /var/lib/plinth/firstboot-wizard-secret db_subst plinth/firstboot_wizard_secret secret $(cat /var/lib/plinth/firstboot-wizard-secret) db_input high plinth/firstboot_wizard_secret || true db_go fi ;; esac # Automatically added by dh_python3 if command -v py3compile >/dev/null 2>&1; then py3compile -p freedombox fi if command -v pypy3compile >/dev/null 2>&1; then pypy3compile -p freedombox || true fi # End automatically added section # Automatically added by dh_installdeb/13.24.2 dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/lib 0.4.3-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/expert_mode 0.4.3-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/packages 0.5-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/xmpp 0.13.0\+ds-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/apps 0.15.1\+ds-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/owncloud 0.15.1\+ds-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/system 0.15.1\+ds-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/disks 0.15.3\+ds-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/udiskie 0.39.0\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/restore 20.1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/repro 20.1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apt/preferences.d/50freedombox3.pref 20.5\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/plinth.config 20.12\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/custom-shortcuts.json 20.12\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/coquelicot 20.14\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/diaspora 21.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/monkeysphere 21.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/tahoe 21.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/tahoe-plinth.conf 21.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/mldonkey 22.4\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/mldonkey-freedombox.conf 22.4\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/sites-available/plinth.conf 22.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/sites-available/plinth-ssl.conf 22.16\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/wordpress-auth-freedombox.conf 22.22\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/wordpress-auth-freedombox.conf 22.22\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/security/access.d/10freedombox-performance.conf 22.25\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/security/access.d/10freedombox-security.conf 22.25\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/apache 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/api 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/avahi 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/backups 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/bepasty 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/bind 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/calibre 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/cockpit 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/config 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/coturn 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/datetime 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/deluge 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/diagnostics 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/dynamicdns 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/ejabberd 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/email 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/firewall 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/first_boot 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/gitweb 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/help 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/i2p 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/ikiwiki 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/infinoted 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/janus 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/jsxc 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/letsencrypt 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/matrixsynapse 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/mediawiki 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/minetest 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/minidlna 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/mumble 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/names 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/networks 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/openvpn 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/pagekite 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/performance 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/power 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/privacy 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/privoxy 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/quassel 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/radicale 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/roundcube 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/rssbridge 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/samba 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/searx 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/security 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/shaarli 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/shadowsocks 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/sharing 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/snapshot 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/ssh 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/sso 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/storage 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/syncthing 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/tor 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/transmission 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/ttrss 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/upgrades 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/users 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/wireguard 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/wordpress 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/plinth/modules-enabled/zoph 23.10\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/php-fpm-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/apache-auth-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/bepasty-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/uwsgi/apps-available/bepasty-freedombox.ini 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/calibre-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/cockpit-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/deluge-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/jwchat-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/avahi/services/xmpp-server.service 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/15-freedombox-mail.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/05-freedombox-passdb.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/95-freedombox-sieve.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/05-freedombox-userdb.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/90-freedombox-mailboxes.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/freedombox-ldap.conf.ext 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/90-freedombox-tls.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/90-freedombox-master.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/90-freedombox-lmtp.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/conf.d/15-freedombox-auth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dovecot/freedombox-sieve-after/sort-spam.sieve 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/rspamd/local.d/freedombox-logging.inc 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/rspamd/local.d/freedombox-redis.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/rspamd/local.d/freedombox-milter-headers.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/email-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/dovecot-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/postfix/freedombox-aliases.cf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/gitweb-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/gitweb-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/gitweb-freedombox-auth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/i2p-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/ikiwiki/plinth-blog.setup 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/ikiwiki/plinth-wiki.setup 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/ikiwiki-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/janus-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/letsencrypt/renewal-hooks/deploy/50-freedombox 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/matrix-synapse-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/matrix-auth-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/matrix-auth-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/mediawiki-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/mediawiki/FreedomBoxStaticSettings.php 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/minidlna-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/NetworkManager/dispatcher.d/10-freedombox-batman 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/pagekite.d/90_freedombox_certs.rc 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dpkg/origins/freedombox 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/radicale2-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/roundcube-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/roundcube-auth-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/rss-bridge.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/searx-freedombox-auth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/searx-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/fail2ban.d/freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/includes/freedombox-sharing.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/ssh-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/avahi/services/sftp-ssh.service 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/avahi/services/ssh.service 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/includes/freedombox-single-sign-on.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/syncthing-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/transmission-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/tt-rss-plinth.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apt/apt.conf.d/20freedombox 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apt/apt.conf.d/20freedombox-allow-release-info-change 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apt/apt.conf.d/60unattended-upgrades 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/needrestart/conf.d/freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/includes/freedombox-auth-ldap.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/apache2/conf-available/wordpress-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/jail.d/wordpress-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/wordpress-freedombox.conf 23.11\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/wordpress/freedombox-static.php 23.11\~ -- "$@" # End automatically added section # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper unmask 'plinth.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'plinth.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'plinth.service' >/dev/null || true else # Update the statefile to add new symlinks (if any), which need to be # cleaned up on purge. Also remove old symlinks. deb-systemd-helper update-state 'plinth.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'plinth.service' >/dev/null || true fi fi # End automatically added section exit 0