Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
27c3a61c
Commit
27c3a61c
authored
Mar 12, 2009
by
tbrehm
Browse files
Fixed getmail problem when more then one getmail account exists.
parent
6a8d0d8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
install/dist/lib/fedora.lib.php
View file @
27c3a61c
...
...
@@ -758,6 +758,9 @@ class installer_dist extends installer_base {
if
(
!
is_dir
(
'/var/log/ispconfig'
))
mkdir
(
'/var/log/ispconfig'
);
if
(
!
is_file
(
'/var/log/ispconfig/ispconfig.log'
))
exec
(
'touch /var/log/ispconfig/ispconfig.log'
);
exec
(
'chown getmail /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
exec
(
'chmod 744 /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
}
...
...
@@ -817,11 +820,13 @@ class installer_dist extends installer_base {
exec
(
'crontab -u getmail -l > crontab.txt'
);
$existing_cron_jobs
=
file
(
'crontab.txt'
);
$cron_jobs
=
array
(
'*/5 * * * * '
.
$cf
[
'program'
]
.
' -n -g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
$cron_jobs
=
array
(
'*/5 * * * * /usr/local/ispconfig/server/scripts/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach
(
$cron_jobs
as
$key
=>
$val
)
{
if
(
stristr
(
$val
,
$cf
[
'program'
]
))
unset
(
$existing_cron_jobs
[
$key
]);
if
(
stristr
(
$val
,
'getmail'
))
unset
(
$existing_cron_jobs
[
$key
]);
}
foreach
(
$cron_jobs
as
$cron_job
)
{
...
...
install/dist/lib/opensuse.lib.php
View file @
27c3a61c
...
...
@@ -776,6 +776,9 @@ class installer_dist extends installer_base {
if
(
!
is_dir
(
'/var/log/ispconfig'
))
mkdir
(
'/var/log/ispconfig'
);
if
(
!
is_file
(
'/var/log/ispconfig/ispconfig.log'
))
exec
(
'touch /var/log/ispconfig/ispconfig.log'
);
exec
(
'chown getmail /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
exec
(
'chmod 744 /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
}
...
...
@@ -835,11 +838,13 @@ class installer_dist extends installer_base {
exec
(
'crontab -u getmail -l > crontab.txt'
);
$existing_cron_jobs
=
file
(
'crontab.txt'
);
$cron_jobs
=
array
(
'*/5 * * * * '
.
$cf
[
'program'
]
.
' -n -g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
$cron_jobs
=
array
(
'*/5 * * * * /usr/local/ispconfig/server/scripts/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach
(
$cron_jobs
as
$key
=>
$val
)
{
if
(
stristr
(
$val
,
$cf
[
'program'
]
))
unset
(
$existing_cron_jobs
[
$key
]);
if
(
stristr
(
$val
,
'getmail'
))
unset
(
$existing_cron_jobs
[
$key
]);
}
foreach
(
$cron_jobs
as
$cron_job
)
{
...
...
install/lib/installer_base.lib.php
View file @
27c3a61c
...
...
@@ -1043,6 +1043,9 @@ class installer_base {
if
(
!
is_dir
(
'/var/log/ispconfig'
))
mkdir
(
'/var/log/ispconfig'
);
if
(
!
is_file
(
'/var/log/ispconfig/ispconfig.log'
))
exec
(
'touch /var/log/ispconfig/ispconfig.log'
);
exec
(
'chown getmail /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
exec
(
'chmod 744 /usr/local/ispconfig/server/scripts/run-getmail.sh'
);
}
...
...
@@ -1103,12 +1106,12 @@ class installer_base {
$existing_cron_jobs
=
file
(
'crontab.txt'
);
$cron_jobs
=
array
(
'*/5 * * * *
'
.
$cf
[
'program'
]
.
' -n -g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf
> /dev/null 2>> /var/log/ispconfig/cron.log'
'*/5 * * * *
/usr/local/ispconfig/server/scripts/run-getmail.sh
> /dev/null 2>> /var/log/ispconfig/cron.log'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach
(
$cron_jobs
as
$key
=>
$val
)
{
if
(
stristr
(
$val
,
$cf
[
'program'
]
))
unset
(
$existing_cron_jobs
[
$key
]);
if
(
stristr
(
$val
,
'getmail'
))
unset
(
$existing_cron_jobs
[
$key
]);
}
foreach
(
$cron_jobs
as
$cron_job
)
{
...
...
server/scripts/run-getmail.sh
0 → 100644
View file @
27c3a61c
#!/bin/sh
set
-e
cd
/etc/getmail
rcfiles
=
""
for
file
in
*
.conf
;
do
rcfiles
=
"
$rcfiles
-r
$file
"
done
#echo $rcfiles
exec
/usr/bin/getmail
-n
-v
-g
/etc/getmail
$rcfiles
\ No newline at end of file
Write
Preview
Supports
Markdown
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