diff --git a/build.sh b/build.sh index 0f5a919..3675955 100755 --- a/build.sh +++ b/build.sh @@ -101,17 +101,13 @@ if [ $AUTO_INSTALL = true ]; then exit 1 fi else - read -p "Do you want to install the program? (y/n) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - print_status "Installing dropshell..." - sudo make install - if [ $? -eq 0 ]; then - print_status "Installation successful!" - else - print_error "Installation failed!" - exit 1 - fi + print_status "Installing dropshell..." + sudo make install + if [ $? -eq 0 ]; then + print_status "Installation successful!" + else + print_error "Installation failed!" + exit 1 fi fi diff --git a/src/service_runner.cpp b/src/service_runner.cpp index caed78a..dd2bdb9 100644 --- a/src/service_runner.cpp +++ b/src/service_runner.cpp @@ -772,8 +772,8 @@ std::string service_runner::get_latest_backup_file(const std::string& server, co bool service_runner::rsync_copy(const std::string& local_path, const std::string& remote_path, bool silent) { std::cout << "Copying: [LOCAL] " << local_path << std::endl << std::string(8,' ')<<"[REMOTE] " << remote_path << std::endl; - runner::runner_local rsync_runner("rsync", {"--delete","--mkpath","-zrpc","-e",quote("ssh -p " + mServerEnv.get_SSH_PORT()),local_path, - mServerEnv.get_SSH_USER()+"@"+mServerEnv.get_SSH_HOST()+":"+remote_path}, "", {}, true); + runner::runner_local rsync_runner("rsync", {"--delete","--mkpath","-zrpc","-e",quote("ssh -p " + mServerEnv.get_SSH_PORT()),quote(local_path), + quote(mServerEnv.get_SSH_USER()+"@"+mServerEnv.get_SSH_HOST()+":"+remote_path)}); if (!rsync_runner.execute()) { std::cerr << "Failed to copy files using rsync" << std::endl; diff --git a/src/utils/runner.cpp b/src/utils/runner.cpp index ff7f33e..625f9e9 100644 --- a/src/utils/runner.cpp +++ b/src/utils/runner.cpp @@ -112,6 +112,12 @@ bool runner_local::execute() { close(fd); } } + + std::cout << "Executing command: " << mCommand << std::endl; + std::cout << "Args: "; + for (auto& arg : mArgs) std::cout << "[" << arg << "] "; + std::cout << std::endl; + execvp(mCommand.c_str(), argv.data()); perror("execvp"); exit(127);