Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
483
Issues
483
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
ad935665
Commit
ad935665
authored
Mar 04, 2009
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added log paths for redhat based distributions to the monitor module.
parent
fe98c110
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
install/tpl/server.ini.master
install/tpl/server.ini.master
+1
-1
server/mods-available/monitor_core_module.inc.php
server/mods-available/monitor_core_module.inc.php
+27
-11
No files found.
install/tpl/server.ini.master
View file @
ad935665
...
...
@@ -46,4 +46,4 @@ fastcgi_bin=/usr/bin/php-cgi
[jailkit]
jailkit_chroot_home=/home/[username]
jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh
jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico
jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico
\ No newline at end of file
server/mods-available/monitor_core_module.inc.php
View file @
ad935665
...
...
@@ -1174,33 +1174,49 @@ class monitor_core_module {
function
_getLogData
(
$log
){
switch
(
$log
)
{
$dist
=
''
;
$logfile
=
''
;
if
(
@
is_file
(
'/etc/debian_version'
))
$dist
=
'debian'
;
if
(
@
is_file
(
'/etc/redhat-release'
))
$dist
=
'redhat'
;
switch
(
$log
)
{
case
'log_mail'
:
$logfile
=
'/var/log/mail.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/mail.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/maillog'
;
break
;
case
'log_mail_warn'
:
$logfile
=
'/var/log/mail.warn'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/mail.warn'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/maillog'
;
break
;
case
'log_mail_err'
:
$logfile
=
'/var/log/mail.err'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/mail.err'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/maillog'
;
break
;
case
'log_messages'
:
$logfile
=
'/var/log/messages'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/messages'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/messages'
;
break
;
case
'log_ispc_cron'
:
$logfile
=
'/var/log/ispconfig/cron.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/ispconfig/cron.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/ispconfig/cron.log'
;
break
;
case
'log_freshclam'
:
$logfile
=
'/var/log/clamav/freshclam.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/clamav/freshclam.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/freshclam.log'
;
break
;
case
'log_clamav'
:
$logfile
=
'/var/log/clamav/clamav.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/clamav/clamav.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/maillog'
;
break
;
case
'log_fail2ban'
:
$logfile
=
'/var/log/fail2ban.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/fail2ban.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/fail2ban.log'
;
break
;
case
'log_ispconfig'
:
$logfile
=
'/var/log/ispconfig/ispconfig.log'
;
if
(
$dist
==
'debian'
)
$logfile
=
'/var/log/ispconfig/ispconfig.log'
;
if
(
$dist
==
'redhat'
)
$logfile
=
'/var/log/ispconfig/ispconfig.log'
;
break
;
default
:
$logfile
=
''
;
...
...
@@ -1210,7 +1226,7 @@ class monitor_core_module {
// Getting the logfile content
if
(
$logfile
!=
''
)
{
$logfile
=
escapeshellcmd
(
$logfile
);
if
(
stristr
(
$logfile
,
';'
))
{
if
(
stristr
(
$logfile
,
';'
)
or
substr
(
$logfile
,
0
,
9
)
!=
'/var/log/'
or
(
stristr
(
$logfile
,
'..'
)
)
{
$log
=
'Logfile path error.'
;
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment