mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-13 00:01:52 +02:00
change user/group for config file
This commit is contained in:
parent
1b13cac7b4
commit
52b64e9f0c
7 changed files with 136 additions and 27 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <iostream>
|
||||
#include "common/snapException.h"
|
||||
#include "common/strCompat.h"
|
||||
#include "common/utils/file_utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
|
||||
|
@ -54,7 +55,7 @@ Daemon::~Daemon()
|
|||
void Daemon::daemonize()
|
||||
{
|
||||
std::string pidfileDir(pidfile_.substr(0, pidfile_.find_last_of('/')));
|
||||
mkdirRecursive(pidfileDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
utils::file::mkdirRecursive(pidfileDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
|
||||
/// Ensure only one copy
|
||||
pidFilehandle_ = open(pidfile_.c_str(), O_RDWR|O_CREAT, 0644);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue