20241210142554_setting_add_auto_restart_optout.rb 765 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingAddAutoRestartOptout < ActiveRecord::Migration[7.2]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Auto Shutdown',
  8. name: 'auto_shutdown',
  9. area: 'Core::WebApp',
  10. description: 'Enable or disable self-shutdown of Zammad processes after significant configuration changes. This should only be used if the controlling process manager like systemd or docker supports an automatic restart policy.',
  11. options: {},
  12. state: true,
  13. preferences: { online_service_disable: true },
  14. frontend: false
  15. )
  16. end
  17. end