Robert 2 years ago
parent 9f1d13dac9
commit cd00d2cf2f
  1. 2
      README.md
  2. 7
      app/neato_common.php
  3. 2
      config_files/deploy_example.php

@ -9,4 +9,4 @@ on the server: $ ./neato_deploy.tar.gz.self
$ rm neato_deploy.tar.gz.self $ rm neato_deploy.tar.gz.self
$ rm install_neato.sh $ rm install_neato.sh
## Run $ neato_deploy http://site.com/deployment.txt ## Run $ neato_deploy.sh http://site.com/deployment.txt

@ -24,6 +24,13 @@ function force_root(): void {
} }
} }
function force_normal(): void {
if (posix_getuid() === 0) {
echo 'Please run as a normal user' . PHP_EOL;
exit(1);
}
}
function shasum($file) { function shasum($file) {
if(file_exists($file)) { if(file_exists($file)) {
$hash = hash_file('sha256', $file, false); $hash = hash_file('sha256', $file, false);

@ -13,6 +13,8 @@ Configure::set('preinstall', [
'sed' => [ 'test.ini' => [ 'timeout' => '30', 'keep_alive_setting' => '15' ] ] 'sed' => [ 'test.ini' => [ 'timeout' => '30', 'keep_alive_setting' => '15' ] ]
]); ]);
force_normal();
//run_once(); // only allow, this script, to run once! //run_once(); // only allow, this script, to run once!
$root_password = make_password(Configure::get('passwords', 'length')); $root_password = make_password(Configure::get('passwords', 'length'));

Loading…
Cancel
Save