This commit is contained in:
@ -63,7 +63,7 @@ bool service_runner::install(bool silent) {
|
||||
}
|
||||
|
||||
// Check if rsync is installed on remote host
|
||||
std::string check_rsync_cmd = "which rsync > /dev/null 2>&1";
|
||||
std::string check_rsync_cmd = "which rsync";
|
||||
if (!execute_ssh_command(mServerEnv.get_SSH_INFO(), sCommand(check_rsync_cmd), cMode::Silent))
|
||||
{
|
||||
std::cerr << "rsync is not installed on the remote host" << std::endl;
|
||||
|
@ -127,7 +127,8 @@ bool execute_ssh_command(const sSSHInfo &ssh_info, const sCommand &command, cMod
|
||||
cmdstr = "bash -c " + halfquote(cmdstr);
|
||||
sCommand ssh_command(ssh_cmd.str() + " " + cmdstr);
|
||||
|
||||
bool rval = execute_local_command(ssh_command, mode, output);
|
||||
cMode localmode = mode - cMode::Silent + cMode::RawCommand;
|
||||
bool rval = execute_local_command(ssh_command, localmode, output);
|
||||
|
||||
if (!rval) {
|
||||
std::cerr <<std::endl<<std::endl;
|
||||
@ -152,11 +153,10 @@ std::string sCommand::construct_cmd(cStyle style) const
|
||||
if (mCmd.empty())
|
||||
return "";
|
||||
|
||||
std::string cdcmd;
|
||||
if (!mDir.empty())
|
||||
cdcmd = "cd " + quote(mDir) + " && ";
|
||||
|
||||
std::string cmdstr;
|
||||
if (!mDir.empty())
|
||||
cmdstr = "cd " + quote(mDir) + " && ";
|
||||
|
||||
for (const auto& env_var : mVars) {
|
||||
cmdstr += env_var.first + "=" + quote(dequote(trim(env_var.second))) + " ";
|
||||
}
|
||||
@ -166,7 +166,7 @@ std::string sCommand::construct_cmd(cStyle style) const
|
||||
if (is_safe(style))
|
||||
cmdstr = makesafecmd(cmdstr);
|
||||
|
||||
return cdcmd + cmdstr;
|
||||
return cmdstr;
|
||||
}
|
||||
|
||||
} // namespace dropshell
|
Reference in New Issue
Block a user