linux 编译
This commit is contained in:
@@ -328,10 +328,10 @@ void Global::init_web_server() {
|
||||
&&cb) {
|
||||
|
||||
#ifdef __linux__
|
||||
std::string_view root_dir = Psc::get_exe_dir() + "/..";
|
||||
std::string root_dir = Psc::get_exe_dir() + "/..";
|
||||
|
||||
std::string_view log_file = fmt::format("{}/restart_device.log", root_dir);
|
||||
std::string_view cmd = fmt::format(
|
||||
std::string log_file = fmt::format("{}/restart_device.log", root_dir);
|
||||
std::string cmd = fmt::format(
|
||||
R"(systemd-run --scope --slice=system.slice sudo bash "{}/restart_device.bash" > {} 2>&1 &)",
|
||||
root_dir, log_file);
|
||||
std::cout << "Generated Command: " << cmd << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user