From 12ca5878586e95fe651ee1500d4b2b0e066ea41a Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Fri, 28 Jun 2024 10:57:13 +0200 Subject: [PATCH 1/4] loglevel 1 https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html This should mean we still have all relevant loginfo we need, such as logins and file operations --- templates/application/config.php.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/application/config.php.erb b/templates/application/config.php.erb index af642f6..09dee08 100644 --- a/templates/application/config.php.erb +++ b/templates/application/config.php.erb @@ -68,7 +68,7 @@ $CONFIG = array ( 'instanceid' => '<%= @instanceid %>', 'integrity.check.disabled' => true, 'log_type' => 'file', - 'loglevel' => 0, + 'loglevel' => 1, 'lookup_server' => '<%= @lookup_server %>', 'mail_domain' => '<%= @mail_domain %>', 'mail_from_address' => '<%= @mail_from_address %>', From 9285c155db894b9bc9f8fde24f8eac6b344b41e5 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 1 Jul 2024 15:26:34 +0200 Subject: [PATCH 2/4] Alllow running scan jobs --- manifests/script.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/script.pp b/manifests/script.pp index fdabf30..1f81093 100644 --- a/manifests/script.pp +++ b/manifests/script.pp @@ -56,6 +56,17 @@ class sunetdrive::script ( } $site_name = $config['site_name'] $user_bucket_name = $config['user_bucket_name'] + if $config['user_scans'].is_a?(Array) { + $config['user_scans'].each |$job| { + sunet::scriptherder::cronjob { $job['name']: + cmd => "ssh -t -l script ${job['server']} /usr/bin/sudo /usr/local/bin/occ ${job['container']} files:scan ${job['user']}", + hour => $job['hour'], + minute => $job['minute'], + ok_criteria => ['exit_status=0','max_age=1d'], + warn_criteria => ['exit_status=1','max_age=2d'], + } + } + } # It is a start that will get us user buckets and primary buckets $backup_projects = $location From 08be34741919defddc779ca17737862eeda12c3c Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 1 Jul 2024 16:45:49 +0200 Subject: [PATCH 3/4] Syntax error --- manifests/script.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/script.pp b/manifests/script.pp index 1f81093..d940ea1 100644 --- a/manifests/script.pp +++ b/manifests/script.pp @@ -56,7 +56,7 @@ class sunetdrive::script ( } $site_name = $config['site_name'] $user_bucket_name = $config['user_bucket_name'] - if $config['user_scans'].is_a?(Array) { + if $config['user_scans'] { $config['user_scans'].each |$job| { sunet::scriptherder::cronjob { $job['name']: cmd => "ssh -t -l script ${job['server']} /usr/bin/sudo /usr/local/bin/occ ${job['container']} files:scan ${job['user']}", From 41dd736b20b4a65217642f5312b75acbd535435c Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 14 Aug 2024 14:48:33 +0200 Subject: [PATCH 4/4] we have no naemon user --- manifests/sitemonitornaemon.pp | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifests/sitemonitornaemon.pp b/manifests/sitemonitornaemon.pp index 0739be6..2457f36 100644 --- a/manifests/sitemonitornaemon.pp +++ b/manifests/sitemonitornaemon.pp @@ -42,8 +42,6 @@ class sunetdrive::sitemonitornaemon() { } file { '/etc/naemon/conf.d/sunetdrive_thruk_templates.conf': ensure => present, - owner => 'naemon', - group => 'naemon', content => template('sunetdrive/monitor/sunetdrive_thruk_templates.conf.erb'), mode => '0644', }