-- 010_rocketchat_notifications.sql: Rocket.Chat Benachrichtigungen & 12h Statusbericht Cron-Job

INSERT INTO dc_settings (skey, svalue) VALUES
('rocketchat_enabled', '1'),
('rocketchat_url', 'https://chat.wh1.mhdf.de'),
('rocketchat_username', 'deploymentcenter'),
('rocketchat_password', 'cNt.m.KcWHrb8_X9Tv8-'),
('rocketchat_status_channel', '#DC-Systemstatus'),
('rocketchat_alert_channel', '#DC-Alerts'),
('rocketchat_verify_ssl', '0'),
('rocketchat_report_interval', '43200')
ON DUPLICATE KEY UPDATE svalue = VALUES(svalue);

-- Cronjob fuer den 12-Stunden-Systemstatusbericht (43200 Sekunden)
INSERT INTO watchdog_cron_jobs (name, interval_sec, enabled)
VALUES ('rocketchat_status_report', 43200, 1)
ON DUPLICATE KEY UPDATE interval_sec = VALUES(interval_sec);
