76 $this->enable = $this->enable &&
$bearsamppConfig->getRaw( self::ROOT_CFG_ENABLE );
78 $this->logsPath = $this->symlinkPath .
'/Logs';
81 if ( $this->bearsamppConfRaw !==
false ) {
91 if ( !$this->enable ) {
96 if ( !is_dir( $this->currentPath ) ) {
101 if ( !is_dir( $this->symlinkPath ) ) {
106 if ( !is_file( $this->bearsamppConf ) ) {
113 $log = $this->logsPath .
'/FileZilla Server.log';
114 if ( !file_exists( $this->log ) && file_exists(
$log ) ) {
115 @link(
$log, $this->log );
118 if ( !is_file( $this->exe ) ) {
123 if ( !is_file( $this->conf ) ) {
128 if ( !is_numeric( $this->port ) || $this->port <= 0 ) {
133 if ( !is_numeric( $this->sslPort ) || $this->sslPort <= 0 ) {
138 if ( !file_exists( $this->localItfConf ) ) {
139 if ( !is_dir( dirname( $this->localItfConf ) ) ) {
140 Util::logDebug(
'Create folder ' . dirname( $this->localItfConf ) );
141 @mkdir( dirname( $this->localItfConf ), 0777 );
143 Util::logDebug(
'Write ' . $this->bearsamppConfRaw[self::LOCAL_CFG_ITF_CONF] .
' to ' . $this->localItfConf );
144 @copy( $this->itfConf, $this->localItfConf );
148 $this->service->setBinPath( $this->exe );
285 if ( !$this->enable ) {
290 Util::logDebug( ($sub > 0 ? str_repeat(
' ', 2 * $sub ) :
'') .
'Update ' . $this->name .
' ' .
$version .
' config' );
300 $bearsamppWinbinder->messageBoxError(
313 $bearsamppWinbinder->messageBoxError(
377 if ( !$this->enable ) {
382 self::CFG_SERVER_PORT => $this->port,
383 self::CFG_SERVICE_NAME => $this->service->getName(),
384 self::CFG_WELCOME_MSG => $this->service->getDisplayName(),
385 self::CFG_SERVICE_DISPLAY_NAME => $this->service->getDisplayName()
395 public function setEnable($enabled, $showWindow =
false)
402 $bearsamppWinbinder->messageBoxError(
415 if ( $this->enable ) {