mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
many daemons: depend on all-interfaces instead of gw6c
svn path=/nixos/trunk/; revision=32766
This commit is contained in:
parent
ce83d3580e
commit
86bf5566fe
9 changed files with 13 additions and 34 deletions
|
@ -4,8 +4,6 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
cfg = config.services.dovecot;
|
||||
|
||||
dovecotConf =
|
||||
|
@ -116,7 +114,7 @@ in
|
|||
jobs.dovecot =
|
||||
{ description = "Dovecot IMAP/POP3 server";
|
||||
|
||||
startOn = "started ${startingDependency}";
|
||||
startOn = "started all-interfaces";
|
||||
|
||||
preStart =
|
||||
''
|
||||
|
|
|
@ -4,8 +4,6 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
cfg = config.services.dovecot2;
|
||||
|
||||
dovecotConf =
|
||||
|
@ -125,7 +123,7 @@ in
|
|||
jobs.dovecot2 =
|
||||
{ description = "Dovecot IMAP/POP3 server";
|
||||
|
||||
startOn = "started ${startingDependency}";
|
||||
startOn = "started all-interfaces";
|
||||
|
||||
preStart =
|
||||
''
|
||||
|
|
|
@ -4,8 +4,6 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
cfg = config.services.postfix;
|
||||
user = cfg.user;
|
||||
group = cfg.group;
|
||||
|
@ -21,9 +19,7 @@ let
|
|||
default_privs = nobody
|
||||
|
||||
''
|
||||
+ optionalString (config.services.gw6c.enable || config.networking.enableIPv6) (''
|
||||
inet_protocols = all
|
||||
'')
|
||||
+ optionalString config.networking.enableIPv6 "inet_protocols = all"
|
||||
+ (if cfg.networks != null then
|
||||
''
|
||||
mynetworks = ${concatStringsSep ", " cfg.networks}
|
||||
|
@ -309,7 +305,7 @@ in
|
|||
# accurate way is unlikely to be better.
|
||||
{ description = "Postfix mail server";
|
||||
|
||||
startOn = "started ${startingDependency}";
|
||||
startOn = "started all-interfaces";
|
||||
|
||||
daemonType = "none";
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
cfg = config.services.bind;
|
||||
|
||||
confFile = pkgs.writeText "named.conf"
|
||||
|
|
|
@ -5,7 +5,7 @@ export PATH=@coreutils@/bin
|
|||
|
||||
if test "$1" = "start"; then
|
||||
if ! @procps@/bin/pgrep ircd; then
|
||||
if @gw6cEnabled@; then
|
||||
if @ipv6Enabled@; then
|
||||
while ! @iproute@/sbin/ip addr |
|
||||
@gnugrep@/bin/grep inet6 |
|
||||
@gnugrep@/bin/grep global; do
|
||||
|
|
|
@ -12,7 +12,7 @@ let
|
|||
substFiles = [ "=>/conf" ./ircd.conf ];
|
||||
inherit (pkgs) ircdHybrid coreutils su iproute gnugrep procps;
|
||||
|
||||
gw6cEnabled = if config.services.gw6c.enable && config.services.gw6c.autorun then "true" else "false";
|
||||
ipv6Enabled = if config.networking.enableIPv6 then "true" else "false";
|
||||
|
||||
inherit (cfg) serverName sid description adminEmail
|
||||
extraPort;
|
||||
|
@ -26,8 +26,6 @@ let
|
|||
builder = ./builder.sh;
|
||||
};
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -127,8 +125,8 @@ in
|
|||
|
||||
description = "IRCD Hybrid server";
|
||||
|
||||
startOn = "started ${startingDependency}";
|
||||
stopOn = "stopping ${startingDependency}";
|
||||
startOn = "started all-interfaces";
|
||||
stopOn = "stopping all-interfaces";
|
||||
|
||||
exec = "${ircdService}/bin/control start";
|
||||
};
|
||||
|
|
|
@ -6,10 +6,8 @@ let
|
|||
|
||||
inherit (pkgs) jre openfire coreutils which gnugrep gawk gnused;
|
||||
|
||||
startDependency =
|
||||
if config.services.openfire.usePostgreSQL then "postgresql" else
|
||||
if config.services.gw6c.enable then "gw6c" else
|
||||
"network-interfaces";
|
||||
extraStartDependency =
|
||||
if config.services.openfire.usePostgreSQL then "and started postgresql" else "";
|
||||
|
||||
in
|
||||
|
||||
|
@ -50,7 +48,7 @@ in
|
|||
jobs.openfire =
|
||||
{ description = "OpenFire XMPP server";
|
||||
|
||||
startOn = "started ${startDependency}";
|
||||
startOn = "started all-interfaces ${extraStartDependency}";
|
||||
|
||||
script =
|
||||
''
|
||||
|
|
|
@ -6,8 +6,6 @@ let
|
|||
|
||||
mainCfg = config.services.httpd;
|
||||
|
||||
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
||||
|
||||
httpd = pkgs.apacheHttpd;
|
||||
|
||||
getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
|
||||
|
@ -555,7 +553,7 @@ in
|
|||
|
||||
description = "Apache HTTPD";
|
||||
|
||||
startOn = "started ${startingDependency} and filesystem"
|
||||
startOn = "started all-interfaces and filesystem"
|
||||
# Hacky. Some subservices depend on Postgres
|
||||
# (e.g. Mediawiki), but they don't have a way to declare
|
||||
# that dependency. So just start httpd after postgresql if
|
||||
|
|
|
@ -6,11 +6,6 @@ let
|
|||
|
||||
configFile = ./xfs.conf;
|
||||
|
||||
startingDependency =
|
||||
if config.services.gw6c.enable && config.services.gw6c.autorun
|
||||
then "gw6c"
|
||||
else "network-interfaces";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -41,7 +36,7 @@ in
|
|||
jobs.xfs =
|
||||
{ description = "X Font Server";
|
||||
|
||||
startOn = "started ${startingDependency}";
|
||||
startOn = "started all-interfaces";
|
||||
|
||||
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue