"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/BackupPC/CGI/StartServer.pm" between
BackupPC-4.3.2.tar.gz and BackupPC-4.4.0.tar.gz

About: BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server’s disk (http/cgi user interface).

StartServer.pm  (BackupPC-4.3.2):StartServer.pm  (BackupPC-4.4.0)
skipping to change at line 30 skipping to change at line 30
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
#======================================================================== #========================================================================
# #
# Version 4.3.2, released 17 Feb 2020. # Version 4.4.0, released 20 Jun 2020.
# #
# See http://backuppc.sourceforge.net. # See http://backuppc.sourceforge.net.
# #
#======================================================================== #========================================================================
package BackupPC::CGI::StartServer; package BackupPC::CGI::StartServer;
use strict; use strict;
use BackupPC::CGI::Lib qw(:all); use BackupPC::CGI::Lib qw(:all);
sub action sub action
{ {
if ( -f $Conf{ServerInitdPath} if ( -f $Conf{ServerInitdPath} && $bpc->{Conf}{ServerInitdStartCmd} ne "" &&
&& $bpc->{Conf}{ServerInitdStartCmd} ne "" !$bpc->ServerOK() ) {
&& !$bpc->ServerOK() ) {
my $args = { my $args = {
serverInitdPath => $bpc->{Conf}{ServerInitdPath}, serverInitdPath => $bpc->{Conf}{ServerInitdPath},
sshPath => $bpc->{Conf}{SshPath}, sshPath => $bpc->{Conf}{SshPath},
serverHost => $bpc->{Conf}{ServerHost}, serverHost => $bpc->{Conf}{ServerHost},
}; };
my $serverInitdStartCmd = $bpc->cmdVarSubstitute($bpc->{Conf}{ServerInit dStartCmd}, $args); my $serverInitdStartCmd = $bpc->cmdVarSubstitute($bpc->{Conf}{ServerInit dStartCmd}, $args);
$bpc->cmdSystemOrEval($serverInitdStartCmd, undef, $args); $bpc->cmdSystemOrEval($serverInitdStartCmd, undef, $args);
for ( my $i = 0; $i < 10; $i++ ) { for ( my $i = 0 ; $i < 10 ; $i++ ) {
last unless ( $bpc->ServerConnect($Conf{ServerHost}, $Conf{ServerPor t}) ); last unless ( $bpc->ServerConnect($Conf{ServerHost}, $Conf{ServerPor t}) );
sleep(1); sleep(1);
} }
$bpc->ServerDisconnect(); $bpc->ServerDisconnect();
} }
print $Cgi->redirect($MyURL); print $Cgi->redirect($MyURL);
} }
1; 1;
 End of changes. 3 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)