v0.0.75 - Add rsync deploy script and wizard root-shell handoff for service install path

This commit is contained in:
Your Name
2026-03-18 06:54:30 -04:00
parent 79d592b037
commit 00903d7c8c
4 changed files with 44 additions and 5 deletions
+18 -1
View File
@@ -1373,7 +1373,24 @@ static int install_system_service_with_dedicated_user(const didactyl_config_t* c
if (!cfg || cfg->keys.nsec[0] == '\0') return -1;
if (geteuid() != 0) {
fprintf(stderr, "%sSystem install requires root (run with sudo).%s\n", ANSI_RED, ANSI_RESET);
fprintf(stderr, "%sSystem install requires root.%s\n", ANSI_RED, ANSI_RESET);
fprintf(stderr, " You can open a root shell now and then re-run this install step.\n");
print_option('o', "pen root shell now (sudo -i)");
print_option('r', "eturn without installing");
wizard_option_t root_opts[] = {{'o', ""}, {'r', ""}};
char root_choice = read_menu_choice(root_opts, 2);
if (root_choice == 'o') {
char* sudo_argv[] = {"sudo", "-i", NULL};
if (run_command_local(sudo_argv) != 0) {
fprintf(stderr, "%sFailed to open root shell via sudo.%s\n", ANSI_RED, ANSI_RESET);
} else {
fprintf(stderr, "%sReturned from root shell.%s\n", ANSI_YELLOW, ANSI_RESET);
}
fprintf(stderr,
" Re-run didactyl as root and choose install again to complete system service setup.\n");
}
return -1;
}