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
Guillaume Subiron
ISPConfig 3
Commits
dda2b474
Commit
dda2b474
authored
Jun 26, 2019
by
Marius Burkard
Browse files
Renewal of letsencrypt does not restart/reload nginx, fixes #5033
parent
e6bd0a7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/cron.php
View file @
dda2b474
...
...
@@ -69,9 +69,10 @@ $conf['server_id'] = intval($conf['server_id']);
// Load required base-classes
$app
->
uses
(
'ini_parser,file,services,getconf,system,cron,functions'
);
$app
->
uses
(
'
modules,
ini_parser,file,services,getconf,system,cron,functions'
);
$app
->
load
(
'libdatetime,cronjob'
);
$app
->
modules
->
loadModules
(
'web'
);
// read all cron jobs
$path
=
SCRIPT_PATH
.
'/lib/classes/cron.d'
;
...
...
@@ -114,6 +115,8 @@ foreach($files as $f) {
}
unset
(
$files
);
$app
->
services
->
processDelayedActions
();
// Remove lock
@
unlink
(
$conf
[
'temppath'
]
.
$conf
[
'fs_div'
]
.
'.ispconfig_cron_lock'
);
$app
->
log
(
'Remove Lock: '
.
$conf
[
'temppath'
]
.
$conf
[
'fs_div'
]
.
'.ispconfig_cron_lock'
,
LOGLEVEL_DEBUG
);
...
...
server/lib/classes/modules.inc.php
View file @
dda2b474
...
...
@@ -37,18 +37,32 @@ class modules {
/*
This function is called to load the modules from the mods-enabled or the mods-core folder
*/
function
loadModules
(
$type
)
{
function
loadModules
(
$type
=
'all'
)
{
global
$app
,
$conf
;
$subPath
=
'mods-enabled'
;
if
(
$type
==
'core'
)
$subPath
=
'mods-core'
;
if
(
$type
==
'core'
)
{
$subPath
=
'mods-core'
;
}
elseif
(
$type
==
'all'
)
{
$type
=
''
;
}
elseif
(
!
preg_match
(
'/^\w+$/'
,
$type
))
{
$app
->
log
(
'Invalid loadModules type '
.
$type
,
LOGLEVEL_ERROR
);
return
false
;
}
else
{
$subPath
=
'mods-available'
;
}
$loaded
=
false
;
$modules_dir
=
$conf
[
'rootpath'
]
.
$conf
[
'fs_div'
]
.
$subPath
.
$conf
[
'fs_div'
];
if
(
is_dir
(
$modules_dir
))
{
if
(
$dh
=
opendir
(
$modules_dir
))
{
while
((
$file
=
readdir
(
$dh
))
!==
false
)
{
if
(
$file
!=
'.'
&&
$file
!=
'..'
&&
substr
(
$file
,
-
8
,
8
)
==
'.inc.php'
)
{
$module_name
=
substr
(
$file
,
0
,
-
8
);
if
(
$type
&&
$type
!==
'core'
&&
$type
!=
$module_name
)
{
continue
;
}
$loaded
=
true
;
include_once
$modules_dir
.
$file
;
if
(
$this
->
debug
)
$app
->
log
(
'Loading Module: '
.
$module_name
,
LOGLEVEL_DEBUG
);
$app
->
loaded_modules
[
$module_name
]
=
new
$module_name
;
...
...
@@ -60,6 +74,9 @@ class modules {
$app
->
log
(
'Modules directory missing: '
.
$modules_dir
,
LOGLEVEL_ERROR
);
}
if
(
$type
&&
$type
!==
'core'
&&
$loaded
===
false
)
{
$app
->
log
(
'Module '
.
$type
.
' not found.'
,
LOGLEVEL_ERROR
);
}
}
/*
...
...
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