diff --git a/app/neato.php b/app/neato.php index 61b1c7c..11d7f78 100644 --- a/app/neato.php +++ b/app/neato.php @@ -31,12 +31,8 @@ if ($os_like == 'debian') { require 'OS/neato_' . ucfirst($os['id']) . '.php'; -$auto = false; -foreach($argv as $arg) { - if ($arg == "-y") { - $auto = true; - } -} +$auto = (in_array('-y', $argv)) ? true : false; +$mark = (in_array('-marksafe', $argv)) ? true : false; $file = $argv[1]; if (is_string_found($argv[1], 'http://') || is_string_found($argv[1], 'https://')) { @@ -62,12 +58,9 @@ function do_harm_checker($shasum) { $answer = readline("Do you wish to execute this Script, anyways!! ? "); if ( strtolower( trim($answer) ) === "yes" ) { echo "Okay...!" . PHP_EOL; - save_sha($shasum); } else { exit(1); } - } else { - save_sha($shasum); } } } @@ -87,8 +80,14 @@ if (file_exists($cwd . '/deploy_' . $file.'.php')) { $check_for_harm = false; } else { echo "Danger: SUM of Script has been modified!"; + exit(1); } } + + if ($mark) { + save_sha($shasum); + } + if ($check_for_harm) { do_harm_checker($shasum); } diff --git a/config_files/deploy_test1.php b/config_files/deploy_test1.php index 10b70f6..459367b 100644 --- a/config_files/deploy_test1.php +++ b/config_files/deploy_test1.php @@ -5,6 +5,8 @@ Configure::set('syslog', false); //do_command('apache::ht_password', 'my.htpasswd', 'johnny', 'shhhh'); +force_root(); + $status = do_command('php::query_module', 'gd', '8.2', 'apache2'); echo ($status == 0) ? 'PHP found module gd' : 'gd not found as module for PHP'; diff --git a/neato_deploy.sh b/neato_deploy.sh index 0d547d1..0e9bae7 100755 --- a/neato_deploy.sh +++ b/neato_deploy.sh @@ -1,2 +1,2 @@ #!/bin/bash -php -c /opt/neatoDeployments/neatoDeploy.ini -f /opt/neatoDeployments/neatoDeploy.phar $1 $2 +php -c /opt/neatoDeployments/neatoDeploy.ini -f /opt/neatoDeployments/neatoDeploy.phar $@