Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
car-controlserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenzhongjian
car-controlserver
Commits
066e9458
Commit
066e9458
authored
Mar 23, 2026
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入了system执行检查,和船等的修改
parent
022cddf0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
main
build/main
+0
-0
tailscale_deploy.c
modules/tailscale_deploy/tailscale_deploy.c
+8
-2
No files found.
build/main
View file @
066e9458
No preview for this file type
modules/tailscale_deploy/tailscale_deploy.c
View file @
066e9458
...
@@ -55,12 +55,18 @@ int tailscale_control(cJSON *body) {
...
@@ -55,12 +55,18 @@ int tailscale_control(cJSON *body) {
return
-
4
;
return
-
4
;
}
}
// 用户要求不开机自启,因此先 disable
// 用户要求不开机自启,因此先 disable
system
(
"sudo systemctl disable tailscaled > /dev/null 2>&1"
);
int
disable_ret
=
system
(
"sudo systemctl disable tailscaled > /dev/null 2>&1"
);
if
(
disable_ret
!=
0
)
{
my_zlog_warn
(
"tailscale_control: disable tailscaled failed, ret=%d"
,
disable_ret
);
}
my_zlog_info
(
"tailscale_control: Tailscale installed successfully"
);
my_zlog_info
(
"tailscale_control: Tailscale installed successfully"
);
}
}
// 确保服务已启动
// 确保服务已启动
system
(
"sudo systemctl start tailscaled > /dev/null 2>&1"
);
int
start_service_ret
=
system
(
"sudo systemctl start tailscaled > /dev/null 2>&1"
);
if
(
start_service_ret
!=
0
)
{
my_zlog_warn
(
"tailscale_control: start tailscaled service failed, ret=%d"
,
start_service_ret
);
}
// 启动 tailscale
// 启动 tailscale
char
cmd
[
512
];
char
cmd
[
512
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment