nixos/airsonic: change script to serviceConfig.ExecStart
- shell invocation is not necessary here
This commit is contained in:
parent
85329b96e0
commit
6905e59e25
|
@ -81,16 +81,6 @@ in {
|
||||||
description = "Airsonic Media Server";
|
description = "Airsonic Media Server";
|
||||||
after = [ "local-fs.target" "network.target" ];
|
after = [ "local-fs.target" "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = ''
|
|
||||||
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
|
|
||||||
-Dairsonic.home=${cfg.home} \
|
|
||||||
-Dserver.address=${cfg.listenAddress} \
|
|
||||||
-Dserver.port=${toString cfg.port} \
|
|
||||||
-Dairsonic.contextPath=${cfg.contextPath} \
|
|
||||||
-Djava.awt.headless=true \
|
|
||||||
-verbose:gc \
|
|
||||||
-jar ${pkgs.airsonic}/webapps/airsonic.war
|
|
||||||
'';
|
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
# Install transcoders.
|
# Install transcoders.
|
||||||
|
@ -101,6 +91,16 @@ in {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
|
||||||
|
-Dairsonic.home=${cfg.home} \
|
||||||
|
-Dserver.address=${cfg.listenAddress} \
|
||||||
|
-Dserver.port=${toString cfg.port} \
|
||||||
|
-Dairsonic.contextPath=${cfg.contextPath} \
|
||||||
|
-Djava.awt.headless=true \
|
||||||
|
-verbose:gc \
|
||||||
|
-jar ${pkgs.airsonic}/webapps/airsonic.war
|
||||||
|
'';
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
User = "airsonic";
|
User = "airsonic";
|
||||||
UMask = "0022";
|
UMask = "0022";
|
||||||
|
|
Loading…
Reference in New Issue