stalwart-mail: package upstream systemd unit
This commit is contained in:
@@ -81,11 +81,13 @@ in {
|
||||
services.stalwart-mail = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "local-fs.target" "network.target" ];
|
||||
|
||||
preStart = if useLegacyStorage then ''
|
||||
mkdir -p ${dataDir}/{queue,reports,data/blobs}
|
||||
'' else ''
|
||||
mkdir -p ${dataDir}/{queue,reports,db}
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = [
|
||||
""
|
||||
|
||||
@@ -62,6 +62,13 @@ rustPlatform.buildRustPackage {
|
||||
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/systemd/system
|
||||
|
||||
substitute resources/systemd/stalwart-mail.service $out/lib/systemd/system/stalwart-mail.service \
|
||||
--replace "__PATH__" "$out"
|
||||
'';
|
||||
|
||||
# Tests require reading to /etc/resolv.conf
|
||||
doCheck = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user