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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Massimiliano
ISPConfig 3
Commits
b6936b38
Commit
b6936b38
authored
Dec 14, 2018
by
Marius Burkard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- jailkit update cron improvements
parent
e96019c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
server/lib/classes/cron.d/500-jkupdate.inc.php
server/lib/classes/cron.d/500-jkupdate.inc.php
+26
-1
No files found.
server/lib/classes/cron.d/500-jkupdate.inc.php
View file @
b6936b38
...
...
@@ -86,6 +86,7 @@ class cronjob_jkupdate extends cronjob {
}
if
(
is_array
(
$jailkit_programs
)
&&
!
empty
(
$jailkit_programs
))
$this
->
run_jk_cp
(
$site
[
'document_root'
],
$jailkit_programs
);
$this
->
fix_broken_symlinks
(
$site
[
'document_root'
]);
if
(
$set_php_symlink
){
// create symlink from /usr/bin/php to current PHP version
...
...
@@ -164,6 +165,30 @@ class cronjob_jkupdate extends cronjob {
}
}
private
function
fix_broken_symlinks
(
$document_root
){
global
$app
;
exec
(
'cd '
.
escapeshellarg
(
$document_root
)
.
' && find . -type l \( ! -name web \) -xtype l'
,
$output
,
$retval
);
if
(
is_array
(
$output
)
&&
!
empty
(
$output
)){
foreach
(
$output
as
$link
){
$link
=
trim
(
$link
);
if
(
preg_match
(
'@\.so(\.\d+)*$@'
,
$link
)){
if
(
substr
(
$link
,
0
,
1
)
==
'.'
)
$link
=
substr
(
$link
,
1
);
//echo $link."\n";
$path
=
$document_root
.
$link
;
//if(is_link($path)) echo "Ist Link\n";
//if(!file_exists($path)) echo "Aber Link ist kaputt!\n";
if
(
is_link
(
$path
)
&&
!
file_exists
(
$path
)){
//echo $path."\n";
@
unlink
(
$path
);
$this
->
run_jk_cp
(
$document_root
,
array
(
$link
));
}
}
}
}
}
private
function
exec_log
(
$cmd
)
{
global
$app
;
...
...
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