Test for configuration of ZM_PATH_SHUTDOWN and provide useul error message

This commit is contained in:
Isaac Connor 2020-08-10 12:25:44 -04:00
parent 06a521e30e
commit 5ee086bbfe
1 changed files with 19 additions and 8 deletions

View File

@ -33,6 +33,14 @@ xhtmlHeaders(__FILE__, translate('Shutdown').' '.translate('Restart'));
<h2><?php echo translate('Shutdown').' '.translate('Restart') ?></h2>
</div>
<div id="content">
<?php
if ( !defined('ZM_PATH_SHUTDOWN') or ZM_PATH_SHUTDOWN == '' ) {
echo '<div class="error">ZM_PATH_SHUTDOWN is not defined. This is normally configured in /etc/zm/conf.d/01-system-paths.conf</div>';
} else if ( !file_exists(ZM_PATH_SHUTDOWN) ) {
echo '<div class="error">Path does not exist for ZM_PATH_SHUTDOWN. Current value is '.ZM_PATH_SHUTDOWN.'</div>';
} else {
?>
<form name="contentForm" id="contentForm" method="post" action="?">
<input type="hidden" name="view" value="shutdown"/>
<?php
@ -63,6 +71,9 @@ xhtmlHeaders(__FILE__, translate('Shutdown').' '.translate('Restart'));
<button type="button" data-on-click="closeWindow"><?php echo translate('Close') ?></button>
</div>
</form>
<?php
} # end if PATH_SHUTDOWN looks value
?>
</div>
</div>
</body>