Commit 75ecceda authored by mh's avatar mh
Browse files

move the user scripts logs to the logs folder

parent b5dfc04e
...@@ -12,4 +12,4 @@ script_basename=`basename $2 .run` ...@@ -12,4 +12,4 @@ script_basename=`basename $2 .run`
script="/opt/webhosting_user_scripts/${script_basename}/${script_basename}.rb" script="/opt/webhosting_user_scripts/${script_basename}/${script_basename}.rb"
[ -x ${script} ] || exit 1 [ -x ${script} ] || exit 1
$script $1/$2 2>&1 >> $1/${script_basename}.log $script $1/$2 2>&1 >> $(dirname $(dirname $1))/logs/users-script-${script_basename}.log
...@@ -43,13 +43,9 @@ class webhosting::user_scripts( ...@@ -43,13 +43,9 @@ class webhosting::user_scripts(
} }
selinux::fcontext{ logrotate::rule{
'/var/www/vhosts/[^/]*/scripts/[^/]*/[^/]*\.log(\-.*)?':
before => File['/opt/webhosting_user_scripts/common/run_incron.sh'],
setype => 'httpd_log_t';
} -> logrotate::rule{
'webhosting-scripts': 'webhosting-scripts':
path => '/var/www/vhosts/*/scripts/*/*.log', path => '/var/www/vhosts/*/logs/users-script-*.log',
rotate => 7, rotate => 7,
compress => true, compress => true,
copytruncate => true, copytruncate => true,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment