Disable systemd services when stopping to uninstall them

Until now, we were leaving services "enabled"
(symlinks in /etc/systemd/system/multi-user.target.wants/).

We clean these up now. Broken symlinks may still exist in older
installations that enabled/disabled services. We're not taking care
to fix these up. It's just a cosmetic defect anyway.
development
Slavi Pantaleev 3 years ago
parent f5fd9661fa
commit 735c966ab6

@ -9,6 +9,7 @@
service: service:
name: matrix-bot-go-neb name: matrix-bot-go-neb
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_bot_go_neb_service_stat.stat.exists|bool" when: "matrix_bot_go_neb_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-bot-matrix-reminder-bot name: matrix-bot-matrix-reminder-bot
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists|bool" when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-bot-mjolnir name: matrix-bot-mjolnir
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_bot_mjolnir_service_stat.stat.exists|bool" when: "matrix_bot_mjolnir_service_stat.stat.exists|bool"

@ -54,6 +54,7 @@
service: service:
name: matrix-appservice-discord name: matrix-appservice-discord
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_appservice_discord_stat_db.stat.exists" when: "matrix_appservice_discord_stat_db.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-appservice-discord name: matrix-appservice-discord
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_appservice_discord_service_stat.stat.exists" when: "matrix_appservice_discord_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-appservice-irc name: matrix-appservice-irc
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_appservice_irc_service_stat.stat.exists" when: "matrix_appservice_irc_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-appservice-slack name: matrix-appservice-slack
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_appservice_slack_service_stat.stat.exists" when: "matrix_appservice_slack_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-appservice-webhooks name: matrix-appservice-webhooks
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_appservice_webhooks_service_stat.stat.exists" when: "matrix_appservice_webhooks_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-beeper-linkedin name: matrix-beeper-linkedin
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_beeper_linkedin_service_stat.stat.exists" when: "matrix_beeper_linkedin_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-heisenbridge name: matrix-heisenbridge
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_heisenbridge_service_stat.stat.exists" when: "matrix_heisenbridge_service_stat.stat.exists"

@ -86,6 +86,7 @@
service: service:
name: matrix-mautrix-facebook name: matrix-mautrix-facebook
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mautrix_facebook_stat_database.stat.exists" when: "matrix_mautrix_facebook_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mautrix-facebook name: matrix-mautrix-facebook
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_facebook_service_stat.stat.exists" when: "matrix_mautrix_facebook_service_stat.stat.exists"

@ -85,6 +85,7 @@
service: service:
name: matrix-mautrix-googlechat name: matrix-mautrix-googlechat
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mautrix_googlechat_stat_database.stat.exists" when: "matrix_mautrix_googlechat_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mautrix-googlechat name: matrix-mautrix-googlechat
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_googlechat_service_stat.stat.exists" when: "matrix_mautrix_googlechat_service_stat.stat.exists"

@ -85,6 +85,7 @@
service: service:
name: matrix-mautrix-hangouts name: matrix-mautrix-hangouts
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mautrix_hangouts_stat_database.stat.exists" when: "matrix_mautrix_hangouts_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mautrix-hangouts name: matrix-mautrix-hangouts
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_hangouts_service_stat.stat.exists" when: "matrix_mautrix_hangouts_service_stat.stat.exists"

@ -8,6 +8,7 @@
service: service:
name: matrix-mautrix-instagram name: matrix-mautrix-instagram
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_instagram_service_stat.stat.exists" when: "matrix_mautrix_instagram_service_stat.stat.exists"

@ -10,6 +10,7 @@
service: service:
name: matrix-mautrix-signal-daemon name: matrix-mautrix-signal-daemon
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_signal_daemon_service_stat.stat.exists" when: "matrix_mautrix_signal_daemon_service_stat.stat.exists"
@ -29,6 +30,7 @@
service: service:
name: matrix-mautrix-signal name: matrix-mautrix-signal
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_signal_service_stat.stat.exists" when: "matrix_mautrix_signal_service_stat.stat.exists"

@ -107,6 +107,7 @@
service: service:
name: matrix-mautrix-telegram name: matrix-mautrix-telegram
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mautrix_telegram_stat_database.stat.exists" when: "matrix_mautrix_telegram_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mautrix-telegram name: matrix-mautrix-telegram
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_telegram_service_stat.stat.exists" when: "matrix_mautrix_telegram_service_stat.stat.exists"

@ -93,6 +93,7 @@
service: service:
name: matrix-mautrix-whatsapp name: matrix-mautrix-whatsapp
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mautrix_whatsapp_stat_database.stat.exists" when: "matrix_mautrix_whatsapp_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mautrix-whatsapp name: matrix-mautrix-whatsapp
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mautrix_whatsapp_service_stat.stat.exists" when: "matrix_mautrix_whatsapp_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-discord name: matrix-mx-puppet-discord
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_discord_service_stat.stat.exists" when: "matrix_mx_puppet_discord_service_stat.stat.exists"

@ -31,6 +31,7 @@
service: service:
name: matrix-mx-puppet-groupme name: matrix-mx-puppet-groupme
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mx_puppet_groupme_stat_database.stat.exists" when: "matrix_mx_puppet_groupme_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-groupme name: matrix-mx-puppet-groupme
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_groupme_service_stat.stat.exists" when: "matrix_mx_puppet_groupme_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-instagram name: matrix-mx-puppet-instagram
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_instagram_service_stat.stat.exists" when: "matrix_mx_puppet_instagram_service_stat.stat.exists"

@ -31,6 +31,7 @@
service: service:
name: matrix-mx-puppet-skype name: matrix-mx-puppet-skype
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mx_puppet_skype_stat_database.stat.exists" when: "matrix_mx_puppet_skype_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-skype name: matrix-mx-puppet-skype
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_skype_service_stat.stat.exists" when: "matrix_mx_puppet_skype_service_stat.stat.exists"

@ -31,6 +31,7 @@
service: service:
name: matrix-mx-puppet-slack name: matrix-mx-puppet-slack
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mx_puppet_slack_stat_database.stat.exists" when: "matrix_mx_puppet_slack_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-slack name: matrix-mx-puppet-slack
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_slack_service_stat.stat.exists" when: "matrix_mx_puppet_slack_service_stat.stat.exists"

@ -31,6 +31,7 @@
service: service:
name: matrix-mx-puppet-steam name: matrix-mx-puppet-steam
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mx_puppet_steam_stat_database.stat.exists" when: "matrix_mx_puppet_steam_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-steam name: matrix-mx-puppet-steam
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_steam_service_stat.stat.exists" when: "matrix_mx_puppet_steam_service_stat.stat.exists"

@ -31,6 +31,7 @@
service: service:
name: matrix-mx-puppet-twitter name: matrix-mx-puppet-twitter
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_mx_puppet_twitter_stat_database.stat.exists" when: "matrix_mx_puppet_twitter_stat_database.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-mx-puppet-twitter name: matrix-mx-puppet-twitter
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mx_puppet_twitter_service_stat.stat.exists" when: "matrix_mx_puppet_twitter_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-sms-bridge name: matrix-sms-bridge
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_sms_bridge_service_stat.stat.exists" when: "matrix_sms_bridge_service_stat.stat.exists"

@ -10,6 +10,7 @@
service: service:
name: matrix-riot-web name: matrix-riot-web
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_client_element_enabled|bool and matrix_client_riot_web_service_stat.stat.exists" when: "matrix_client_element_enabled|bool and matrix_client_riot_web_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-client-element name: matrix-client-element
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_client_element_service_stat.stat.exists|bool" when: "matrix_client_element_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-client-hydrogen name: matrix-client-hydrogen
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_client_hydrogen_service_stat.stat.exists|bool" when: "matrix_client_hydrogen_service_stat.stat.exists|bool"

@ -83,6 +83,7 @@
service: service:
name: matrix-corporal name: matrix-corporal
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_corporal_enabled|bool and matrix_corporal_service_stat.stat.exists" when: "not matrix_corporal_enabled|bool and matrix_corporal_service_stat.stat.exists"

@ -10,6 +10,7 @@
service: service:
name: matrix-coturn name: matrix-coturn
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_coturn_service_stat.stat.exists|bool" when: "matrix_coturn_service_stat.stat.exists|bool"
@ -17,6 +18,7 @@
service: service:
name: matrix-coturn name: matrix-coturn
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
failed_when: false failed_when: false
when: "matrix_coturn_service_stat.stat.exists|bool" when: "matrix_coturn_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-dimension name: matrix-dimension
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_dimension_service_stat.stat.exists|bool" when: "matrix_dimension_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-dynamic-dns name: matrix-dynamic-dns
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_dynamic_dns_service_stat.stat.exists" when: "matrix_dynamic_dns_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-email2matrix name: matrix-email2matrix
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_email2matrix_service_stat.stat.exists|bool" when: "matrix_email2matrix_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-etherpad name: matrix-etherpad
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_etherpad_service_stat.stat.exists|bool" when: "matrix_etherpad_service_stat.stat.exists|bool"

@ -93,6 +93,7 @@
service: service:
name: matrix-grafana name: matrix-grafana
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_grafana_enabled|bool and matrix_grafana_service_stat.stat.exists" when: "not matrix_grafana_enabled|bool and matrix_grafana_service_stat.stat.exists"

@ -68,6 +68,7 @@
service: service:
name: matrix-jitsi-jicofo name: matrix-jitsi-jicofo
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jicofo_service_stat.stat.exists" when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jicofo_service_stat.stat.exists"

@ -68,6 +68,7 @@
service: service:
name: matrix-jitsi-jvb name: matrix-jitsi-jvb
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jvb_service_stat.stat.exists" when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jvb_service_stat.stat.exists"

@ -59,6 +59,7 @@
service: service:
name: matrix-jitsi-prosody name: matrix-jitsi-prosody
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_prosody_service_stat.stat.exists" when: "not matrix_jitsi_enabled|bool and matrix_jitsi_prosody_service_stat.stat.exists"

@ -69,6 +69,7 @@
service: service:
name: matrix-jitsi-web name: matrix-jitsi-web
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_web_service_stat.stat.exists" when: "not matrix_jitsi_enabled|bool and matrix_jitsi_web_service_stat.stat.exists"

@ -23,6 +23,7 @@
service: service:
name: matrix-mxisd name: matrix-mxisd
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "matrix_mxisd_service_stat.stat.exists" when: "matrix_mxisd_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-ma1sd name: matrix-ma1sd
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_ma1sd_service_stat.stat.exists|bool" when: "matrix_ma1sd_service_stat.stat.exists|bool"

@ -79,6 +79,7 @@
service: service:
name: matrix-mailer name: matrix-mailer
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_mailer_enabled|bool and matrix_mailer_service_stat.stat.exists" when: "not matrix_mailer_enabled|bool and matrix_mailer_service_stat.stat.exists"

@ -193,6 +193,7 @@
service: service:
name: matrix-nginx-proxy name: matrix-nginx-proxy
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_nginx_proxy_enabled|bool and matrix_nginx_proxy_service_stat.stat.exists" when: "not matrix_nginx_proxy_enabled|bool and matrix_nginx_proxy_service_stat.stat.exists"

@ -69,6 +69,7 @@
service: service:
name: matrix-postgres-backup name: matrix-postgres-backup
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "not matrix_postgres_backup_enabled|bool and matrix_postgres_backup_service_stat.stat.exists" when: "not matrix_postgres_backup_enabled|bool and matrix_postgres_backup_service_stat.stat.exists"

@ -38,6 +38,7 @@
service: service:
name: matrix-prometheus-node-exporter name: matrix-prometheus-node-exporter
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_prometheus_node_exporter_enabled|bool and matrix_prometheus_node_exporter_service_stat.stat.exists" when: "not matrix_prometheus_node_exporter_enabled|bool and matrix_prometheus_node_exporter_service_stat.stat.exists"

@ -38,6 +38,7 @@
service: service:
name: matrix-prometheus-postgres-exporter name: matrix-prometheus-postgres-exporter
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_prometheus_postgres_exporter_enabled|bool and matrix_prometheus_postgres_exporter_service_stat.stat.exists" when: "not matrix_prometheus_postgres_exporter_enabled|bool and matrix_prometheus_postgres_exporter_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-prometheus name: matrix-prometheus
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_prometheus_service_stat.stat.exists|bool" when: "matrix_prometheus_service_stat.stat.exists|bool"

@ -72,6 +72,7 @@
service: service:
name: matrix-redis name: matrix-redis
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
when: "not matrix_redis_enabled|bool and matrix_redis_service_stat.stat.exists" when: "not matrix_redis_enabled|bool and matrix_redis_service_stat.stat.exists"

@ -9,6 +9,7 @@
service: service:
name: matrix-registration name: matrix-registration
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_registration_service_stat.stat.exists|bool" when: "matrix_registration_service_stat.stat.exists|bool"

@ -9,6 +9,7 @@
service: service:
name: matrix-sygnal name: matrix-sygnal
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_sygnal_service_stat.stat.exists|bool" when: "matrix_sygnal_service_stat.stat.exists|bool"

@ -59,6 +59,7 @@
service: service:
name: matrix-synapse-admin name: matrix-synapse-admin
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "not matrix_synapse_admin_enabled|bool and matrix_synapse_admin_service_stat.stat.exists" when: "not matrix_synapse_admin_enabled|bool and matrix_synapse_admin_service_stat.stat.exists"

@ -7,6 +7,7 @@
service: service:
name: matrix-goofys name: matrix-goofys
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_goofys_service_stat.stat.exists" when: "matrix_goofys_service_stat.stat.exists"

@ -44,6 +44,7 @@
service: service:
name: matrix-synapse name: matrix-synapse
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result

@ -7,6 +7,7 @@
service: service:
name: matrix-synapse name: matrix-synapse
state: stopped state: stopped
enabled: no
daemon_reload: yes daemon_reload: yes
register: stopping_result register: stopping_result
when: "matrix_synapse_service_stat.stat.exists" when: "matrix_synapse_service_stat.stat.exists"

Loading…
Cancel
Save