You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.7 KiB
48 lines
1.7 KiB
<?php
|
|
|
|
// require_once( $WDIR . '/inst_lib.php');
|
|
echo "\n\n\nAFTER!!\n\n\n";
|
|
|
|
$DBHost="localhost";
|
|
$DBName="argus";
|
|
$DBUser="argus";
|
|
$DBPassword="Jc8zYWEhqGAGGYJRum92tm";
|
|
|
|
run_command( 'cp -f /srv/etc/ag_nginx/argus_nginx.service /etc/systemd/system/argus_nginx.service');
|
|
run_command( 'cp -f /srv/etc/argus_shutdown.service /etc/systemd/system/argus_shutdown.service');
|
|
run_command( 'systemctl enable argus_nginx');
|
|
run_command( 'systemctl enable argus_shutdown');
|
|
run_command( 'systemctl daemon-reload');
|
|
run_command( 'cp -f /srv/etc/nginx/default /etc/nginx/sites-available/default');
|
|
run_command( 'cp -f /srv/etc/rc.local /etc/rc.local');
|
|
run_command( 'chown -R www-data:www-data /srv/data');
|
|
run_command( 'chmod -R 0775 /srv/data');
|
|
run_command( 'ln -s /srv/data /srv/serva/data');
|
|
run_command( 'ln -s /srv/data /srv/www/web/lib/controller/data');
|
|
//Restore Settings
|
|
function restore_whole_line( $A, $B , $C ){
|
|
$POPIN = array();
|
|
foreach( $C as $Key=>$Value ){
|
|
if( $Key != 'id' ){
|
|
$POPIN[]="`".$Key."`='".$Value."'";
|
|
};
|
|
};
|
|
$QS = "UPDATE `{$B}` SET ". implode(",",$POPIN)." WHERE `id`=" . $C['id'];
|
|
out_log( $QS );
|
|
$A->Query( $QS );
|
|
};
|
|
function restore_line( $A, $B , $C ){
|
|
foreach( $C as $Key=>$Value ){
|
|
if( $Key != 'id' ){
|
|
$P="`".$Key."`='".$Value."'";
|
|
$QS = "UPDATE `{$B}` SET ".$P." WHERE `id`=" . $C['id'];
|
|
out_log( $QS );
|
|
$A->Query( $QS );
|
|
};
|
|
};
|
|
};
|
|
run_command( 'systemctl start argus_nginx');
|
|
//run_command( 'systemctl enable argus_nginx');
|
|
//run_command( 'systemctl enable argus_shutdown');
|
|
run_command( 'systemctl start nginx');
|
|
?>
|