File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,15 @@ function update($event_name,$data) {
219219 // Remove the symlink for the site, if site is renamed
220220 if ($ this ->action == 'update ' && $ data ["old " ]["domain " ] != '' && $ data ["new " ]["domain " ] != $ data ["old " ]["domain " ]) {
221221 if (is_dir ('/var/log/ispconfig/httpd/ ' .$ data ["old " ]["domain " ])) exec ('rm -rf /var/log/ispconfig/httpd/ ' .$ data ["old " ]["domain " ]);
222- if (is_link ($ data ["old " ]["document_root " ]."/log " )) exec ( " rm -f " . $ data ["old " ]["document_root " ]."/log " );
222+ if (is_link ($ data ["old " ]["document_root " ]."/log " )) unlink ( $ data ["old " ]["document_root " ]."/log " );
223223 }
224224
225225 // Create the symlink for the logfiles
226226 if (!is_dir ('/var/log/ispconfig/httpd/ ' .$ data ["new " ]["domain " ])) exec ('mkdir -p /var/log/ispconfig/httpd/ ' .$ data ["new " ]["domain " ]);
227- if (!is_link ($ data ["new " ]["document_root " ]."/log " )) exec ("ln -s /var/log/ispconfig/httpd/ " .$ data ["new " ]["domain " ]." " .$ data ["new " ]["document_root " ]."/log " );
227+ if (!is_link ($ data ["new " ]["document_root " ]."/log " )) {
228+ exec ("ln -s /var/log/ispconfig/httpd/ " .$ data ["new " ]["domain " ]." " .$ data ["new " ]["document_root " ]."/log " );
229+ $ app ->log ("Creating Symlink: ln -s /var/log/ispconfig/httpd/ " .$ data ["new " ]["domain " ]." " .$ data ["new " ]["document_root " ]."/log " ,LOGLEVEL_DEBUG );
230+ }
228231
229232
230233 // Get the client ID
You can’t perform that action at this time.
0 commit comments