linux 编译

This commit is contained in:
2026-07-13 15:17:20 +08:00
parent 343414650e
commit 92ceeaa908
8 changed files with 10575 additions and 10181 deletions
+3 -3
View File
@@ -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;