mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
Merge pull request #286356 from Stunkymonkey/terraria-umask-group
nixos/terraria: prefer 'serviceConfig' over 'chmod/chgrp'
This commit is contained in:
commit
a41e12cc9d
@ -148,16 +148,13 @@ in
|
||||
|
||||
serviceConfig = {
|
||||
User = "terraria";
|
||||
Group = "terraria";
|
||||
Type = "forking";
|
||||
GuessMainPID = true;
|
||||
UMask = 007;
|
||||
ExecStart = "${getBin pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/terraria.sock new -d ${pkgs.terraria-server}/bin/TerrariaServer ${concatStringsSep " " flags}";
|
||||
ExecStop = "${stopScript} $MAINPID";
|
||||
};
|
||||
|
||||
postStart = ''
|
||||
${pkgs.coreutils}/bin/chmod 660 ${cfg.dataDir}/terraria.sock
|
||||
${pkgs.coreutils}/bin/chgrp terraria ${cfg.dataDir}/terraria.sock
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
|
Loading…
Reference in New Issue
Block a user