FreedomBox/debian/freedombox.maintscript
Sunil Mohan Adapa 40eecb6446
*: Move modules-enabled files to /usr/share
- This will leave /etc/{plinth,freedombox} empty by default making service more
robust to run across various environments and situations. See systemd's
explanation for more details.

- Use Debian maintainer scripts remove all the existing files in
/etc/plinth/modules-enabled.

- Read from /usr/share/freedombox/modules-enabled then from
/etc/plinth/modules-enabled and finally from /etc/freedombox/modules-enabled.
Later read ones override previously read files. Any file pointing to /dev/null
will mean the module must be ignored.

Tests:

- Clean up /etc/plinth, /etc/freedombox and
/usr/share/freedombox/modules-enabled. Run service and notice that files are
getting loaded from development folder using a debug message.

- Run setup.py and notice that files get installed in
/usr/share/freedombox/modules-enabled/ and in the next run they get loaded from
there.

- Create a override file in /etc/plinth/modules-enabled/transmission and notice
that overriden file gets priority over the one in
/usr/share/freedombox/modules-enabled.

- Link the file /etc/plinth/modules-enabled/transmission to /dev/null and notice
that is not loaded.

- Create another file in /etc/freedombox/modules-enabled/transmission and notice
that it overrides the previous two files.

- All affected modules are loaded.

- Build a new Debian package and ensure that upgrading 23.8 to new version
removes are all configuration files.

- Build developer documentation and test that Tutorial -> Full Code and Tutorial
-> Skeleton sections have been updated with references to
-.../modules-enabled/... paths.

- Install quassel and notice that certificates were copied to /var/lib/quassel
directory. Change domain to another domain and notice that certificates were
copied again to that directory.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-13 07:08:43 -04:00

90 lines
4.9 KiB
Plaintext

rm_conffile /etc/plinth/modules-enabled/lib 0.4.3-1~
rm_conffile /etc/plinth/modules-enabled/expert_mode 0.4.3-1~
rm_conffile /etc/plinth/modules-enabled/packages 0.5-1~
rm_conffile /etc/plinth/modules-enabled/xmpp 0.13.0+ds-1~
rm_conffile /etc/plinth/modules-enabled/apps 0.15.1+ds-2~
rm_conffile /etc/plinth/modules-enabled/owncloud 0.15.1+ds-2~
rm_conffile /etc/plinth/modules-enabled/system 0.15.1+ds-2~
rm_conffile /etc/plinth/modules-enabled/disks 0.15.3+ds-1~
rm_conffile /etc/plinth/modules-enabled/udiskie 0.39.0~
rm_conffile /etc/plinth/modules-enabled/restore 20.1~
rm_conffile /etc/plinth/modules-enabled/repro 20.1~
rm_conffile /etc/apt/preferences.d/50freedombox3.pref 20.5~
rm_conffile /etc/plinth/plinth.config 20.12~
rm_conffile /etc/plinth/custom-shortcuts.json 20.12~
rm_conffile /etc/plinth/modules-enabled/coquelicot 20.14~
rm_conffile /etc/plinth/modules-enabled/diaspora 21.16~
rm_conffile /etc/plinth/modules-enabled/monkeysphere 21.16~
rm_conffile /etc/plinth/modules-enabled/tahoe 21.16~
rm_conffile /etc/apache2/conf-available/tahoe-plinth.conf 21.16~
rm_conffile /etc/plinth/modules-enabled/mldonkey 22.4~
rm_conffile /etc/apache2/conf-available/mldonkey-freedombox.conf 22.4~
rm_conffile /etc/apache2/sites-available/plinth.conf 22.16~
rm_conffile /etc/apache2/sites-available/plinth-ssl.conf 22.16~
rm_conffile /etc/fail2ban/jail.d/wordpress-auth-freedombox.conf 22.22~
rm_conffile /etc/fail2ban/filter.d/wordpress-auth-freedombox.conf 22.22~
rm_conffile /etc/security/access.d/10freedombox-performance.conf 22.25~
rm_conffile /etc/security/access.d/10freedombox-security.conf 22.25~
rm_conffile /etc/plinth/modules-enabled/apache 23.10~
rm_conffile /etc/plinth/modules-enabled/api 23.10~
rm_conffile /etc/plinth/modules-enabled/avahi 23.10~
rm_conffile /etc/plinth/modules-enabled/backups 23.10~
rm_conffile /etc/plinth/modules-enabled/bepasty 23.10~
rm_conffile /etc/plinth/modules-enabled/bind 23.10~
rm_conffile /etc/plinth/modules-enabled/calibre 23.10~
rm_conffile /etc/plinth/modules-enabled/cockpit 23.10~
rm_conffile /etc/plinth/modules-enabled/config 23.10~
rm_conffile /etc/plinth/modules-enabled/coturn 23.10~
rm_conffile /etc/plinth/modules-enabled/datetime 23.10~
rm_conffile /etc/plinth/modules-enabled/deluge 23.10~
rm_conffile /etc/plinth/modules-enabled/diagnostics 23.10~
rm_conffile /etc/plinth/modules-enabled/dynamicdns 23.10~
rm_conffile /etc/plinth/modules-enabled/ejabberd 23.10~
rm_conffile /etc/plinth/modules-enabled/email 23.10~
rm_conffile /etc/plinth/modules-enabled/firewall 23.10~
rm_conffile /etc/plinth/modules-enabled/first_boot 23.10~
rm_conffile /etc/plinth/modules-enabled/gitweb 23.10~
rm_conffile /etc/plinth/modules-enabled/help 23.10~
rm_conffile /etc/plinth/modules-enabled/i2p 23.10~
rm_conffile /etc/plinth/modules-enabled/ikiwiki 23.10~
rm_conffile /etc/plinth/modules-enabled/infinoted 23.10~
rm_conffile /etc/plinth/modules-enabled/janus 23.10~
rm_conffile /etc/plinth/modules-enabled/jsxc 23.10~
rm_conffile /etc/plinth/modules-enabled/letsencrypt 23.10~
rm_conffile /etc/plinth/modules-enabled/matrixsynapse 23.10~
rm_conffile /etc/plinth/modules-enabled/mediawiki 23.10~
rm_conffile /etc/plinth/modules-enabled/minetest 23.10~
rm_conffile /etc/plinth/modules-enabled/minidlna 23.10~
rm_conffile /etc/plinth/modules-enabled/mumble 23.10~
rm_conffile /etc/plinth/modules-enabled/names 23.10~
rm_conffile /etc/plinth/modules-enabled/networks 23.10~
rm_conffile /etc/plinth/modules-enabled/openvpn 23.10~
rm_conffile /etc/plinth/modules-enabled/pagekite 23.10~
rm_conffile /etc/plinth/modules-enabled/performance 23.10~
rm_conffile /etc/plinth/modules-enabled/power 23.10~
rm_conffile /etc/plinth/modules-enabled/privacy 23.10~
rm_conffile /etc/plinth/modules-enabled/privoxy 23.10~
rm_conffile /etc/plinth/modules-enabled/quassel 23.10~
rm_conffile /etc/plinth/modules-enabled/radicale 23.10~
rm_conffile /etc/plinth/modules-enabled/roundcube 23.10~
rm_conffile /etc/plinth/modules-enabled/rssbridge 23.10~
rm_conffile /etc/plinth/modules-enabled/samba 23.10~
rm_conffile /etc/plinth/modules-enabled/searx 23.10~
rm_conffile /etc/plinth/modules-enabled/security 23.10~
rm_conffile /etc/plinth/modules-enabled/shaarli 23.10~
rm_conffile /etc/plinth/modules-enabled/shadowsocks 23.10~
rm_conffile /etc/plinth/modules-enabled/sharing 23.10~
rm_conffile /etc/plinth/modules-enabled/snapshot 23.10~
rm_conffile /etc/plinth/modules-enabled/ssh 23.10~
rm_conffile /etc/plinth/modules-enabled/sso 23.10~
rm_conffile /etc/plinth/modules-enabled/storage 23.10~
rm_conffile /etc/plinth/modules-enabled/syncthing 23.10~
rm_conffile /etc/plinth/modules-enabled/tor 23.10~
rm_conffile /etc/plinth/modules-enabled/transmission 23.10~
rm_conffile /etc/plinth/modules-enabled/ttrss 23.10~
rm_conffile /etc/plinth/modules-enabled/upgrades 23.10~
rm_conffile /etc/plinth/modules-enabled/users 23.10~
rm_conffile /etc/plinth/modules-enabled/wireguard 23.10~
rm_conffile /etc/plinth/modules-enabled/wordpress 23.10~
rm_conffile /etc/plinth/modules-enabled/zoph 23.10~