From a16f4383142403eab145a8d147e5c9c93309ba4f Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 13 Jun 2016 02:04:22 +0200 Subject: sprinkle with some write{B,D}ash --- krebs/3modules/apt-cacher-ng.nix | 3 +-- krebs/3modules/backup.nix | 3 +-- krebs/3modules/bepasty-server.nix | 3 +-- krebs/3modules/buildbot/master.nix | 3 +-- krebs/3modules/buildbot/slave.nix | 3 +-- krebs/3modules/git.nix | 2 +- krebs/3modules/github-hosts-sync.nix | 3 +-- krebs/3modules/iptables.nix | 5 ++--- krebs/3modules/repo-sync.nix | 11 +++++------ krebs/3modules/retiolum.nix | 6 +++--- krebs/3modules/tinc_graphs.nix | 6 ++---- krebs/5pkgs/Reaktor/plugins.nix | 3 +-- krebs/5pkgs/git-hooks/default.nix | 3 +-- krebs/5pkgs/hashPassword/default.nix | 3 +-- krebs/5pkgs/krebspaste/default.nix | 9 ++++----- krebs/5pkgs/pssh/default.nix | 5 ++--- tv/1systems/nomic.nix | 3 +-- tv/1systems/xu.nix | 3 +-- tv/2configs/pulse.nix | 3 +-- tv/5pkgs/default.nix | 3 +-- 20 files changed, 32 insertions(+), 51 deletions(-) diff --git a/krebs/3modules/apt-cacher-ng.nix b/krebs/3modules/apt-cacher-ng.nix index 46b405842..e80d383f8 100644 --- a/krebs/3modules/apt-cacher-ng.nix +++ b/krebs/3modules/apt-cacher-ng.nix @@ -135,8 +135,7 @@ let wantedBy = [ "multi-user.target" ]; serviceConfig = { PermissionsStartOnly = true; - ExecStartPre = pkgs.writeScript "acng-init" '' - #!/bin/sh + ExecStartPre = pkgs.writeDash "acng-init" '' mkdir -p ${shell.escape cfg.cacheDir} ${shell.escape cfg.logDir} chown acng:acng ${shell.escape cfg.cacheDir} ${shell.escape cfg.logDir} ''; diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix index 71b22d8cb..4569d400f 100644 --- a/krebs/3modules/backup.nix +++ b/krebs/3modules/backup.nix @@ -121,8 +121,7 @@ let "mkdir -m 0700 -p ${shell.escape plan.dst.path}/current" "flock -n ${shell.escape plan.dst.path} rsync" ]; - in pkgs.writeScript "backup.${plan.name}" '' - #! ${pkgs.bash}/bin/bash + in pkgs.writeBash "backup.${plan.name}" '' set -efu start_date=$(date +%s) ssh_target=${shell.escape login-name}@$(${fastest-address remote.host}) diff --git a/krebs/3modules/bepasty-server.nix b/krebs/3modules/bepasty-server.nix index cbf87b2a7..080d2188d 100644 --- a/krebs/3modules/bepasty-server.nix +++ b/krebs/3modules/bepasty-server.nix @@ -109,8 +109,7 @@ let Type = "simple"; PrivateTmp = true; - ExecStartPre = assert server.secretKey != ""; pkgs.writeScript "bepasty-server.${name}-init" '' - #!/bin/sh + ExecStartPre = assert server.secretKey != ""; pkgs.writeDash "bepasty-server.${name}-init" '' mkdir -p "${server.dataDir}" "${server.workDir}" chown bepasty:bepasty "${server.workDir}" "${server.dataDir}" cat > "${server.workDir}/bepasty-${name}.conf" <