Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
00d730a9
Commit
00d730a9
authored
Feb 11, 2009
by
tbrehm
Browse files
Fixed several getmail crontab errors in opensuse and fedora installer.
parent
37e66149
Changes
2
Show whitespace changes
Inline
Side-by-side
install/dist/lib/fedora.lib.php
View file @
00d730a9
...
...
@@ -770,11 +770,11 @@ 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'
]
.
' -g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
$cron_jobs
=
array
(
'*/5 * * * * '
.
$cf
[
'program'
]
.
'
-n
-g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach
(
$cron_jobs
as
$key
=>
$val
)
{
if
(
stristr
(
$val
,
$cf
[
'program'
]))
unset
(
$cron_jobs
[
$key
]);
if
(
stristr
(
$val
,
$cf
[
'program'
]))
unset
(
$
existing_
cron_jobs
[
$key
]);
}
foreach
(
$cron_jobs
as
$cron_job
)
{
...
...
@@ -786,6 +786,9 @@ class installer_dist extends installer_base {
exec
(
'crontab -u getmail crontab.txt &> /dev/null'
);
unlink
(
'crontab.txt'
);
}
exec
(
'touch /var/log/ispconfig/cron.log'
);
exec
(
'chmod +666 /var/log/ispconfig/cron.log'
);
}
}
...
...
install/dist/lib/opensuse.lib.php
View file @
00d730a9
...
...
@@ -789,11 +789,11 @@ 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'
]
.
' -g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
$cron_jobs
=
array
(
'*/5 * * * * '
.
$cf
[
'program'
]
.
'
-n
-g '
.
$cf
[
'config_dir'
]
.
' -r '
.
$cf
[
'config_dir'
]
.
'/*.conf &> /dev/null'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach
(
$cron_jobs
as
$key
=>
$val
)
{
if
(
stristr
(
$val
,
$cf
[
'program'
]))
unset
(
$cron_jobs
[
$key
]);
if
(
stristr
(
$val
,
$cf
[
'program'
]))
unset
(
$
existing_
cron_jobs
[
$key
]);
}
foreach
(
$cron_jobs
as
$cron_job
)
{
...
...
@@ -805,6 +805,9 @@ class installer_dist extends installer_base {
exec
(
'crontab -u getmail crontab.txt &> /dev/null'
);
unlink
(
'crontab.txt'
);
}
exec
(
'touch /var/log/ispconfig/cron.log'
);
exec
(
'chmod +666 /var/log/ispconfig/cron.log'
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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