From 3299c6b29ba11c1478964e042d15e2a2bdb90017 Mon Sep 17 00:00:00 2001 From: Robin Davies Date: Thu, 10 Mar 2022 12:30:09 -0500 Subject: [PATCH] Home directory for pipedal_d required. Fixes #19 --- src/ConfigMain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ConfigMain.cpp b/src/ConfigMain.cpp index ae413e2..58183e1 100644 --- a/src/ConfigMain.cpp +++ b/src/ConfigMain.cpp @@ -350,8 +350,7 @@ void InstallJackService() } // lock account for login. silentSysExec("passwd -l " JACK_SERVICE_ACCOUNT_NAME); - } - + } // Add to audio groups. // sysExec(USERMOD_BIN " -a -G " JACK_SERVICE_GROUP_NAME " " JACK_SERVICE_ACCOUNT_NAME); sysExec(USERMOD_BIN " -a -G" AUDIO_SERVICE_GROUP_NAME " " JACK_SERVICE_ACCOUNT_NAME); @@ -449,13 +448,13 @@ void Install(const std::filesystem::path &programPrefix, const std::string endpo if (!userExists(SERVICE_ACCOUNT_NAME)) { - if (sysExec(USERADD_BIN " " SERVICE_ACCOUNT_NAME " -g " SERVICE_GROUP_NAME " -M -N -r") != EXIT_SUCCESS) + if (sysExec(USERADD_BIN " " SERVICE_ACCOUNT_NAME " -g " SERVICE_GROUP_NAME " -m --home /var/pipedal/home -N -r") != EXIT_SUCCESS) { // throw PiPedalException("Failed to create service account."); } // lock account for login. silentSysExec("passwd -l " SERVICE_ACCOUNT_NAME); - } + } // Add to audio groups. sysExec(USERMOD_BIN " -a -G " AUDIO_SERVICE_GROUP_NAME " " SERVICE_ACCOUNT_NAME);