urlwatch: set dataDir to home of urlwatch user
otherwise /var/empty will be used which then will clash with exim which tries to create Maildir in this folder explicitly setting the home directory in users also avoids the usage of execstartpre in favor of createHome
This commit is contained in:
parent
01a4ed89c7
commit
c36d644059
|
@ -142,17 +142,6 @@ let
|
|||
PrivateTmp = "true";
|
||||
SyslogIdentifier = "urlwatch";
|
||||
Type = "oneshot";
|
||||
ExecStartPre =
|
||||
pkgs.writeDash "urlwatch-prestart" ''
|
||||
set -euf
|
||||
|
||||
dataDir=$HOME
|
||||
|
||||
if ! test -e "$dataDir"; then
|
||||
mkdir -m 0700 -p "$dataDir"
|
||||
chown ${user.name}: "$dataDir"
|
||||
fi
|
||||
'';
|
||||
ExecStart = pkgs.writeDash "urlwatch" ''
|
||||
set -euf
|
||||
|
||||
|
@ -185,6 +174,8 @@ let
|
|||
};
|
||||
users.extraUsers = singleton {
|
||||
inherit (user) name uid;
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue