github-hosts-sync service: fix directory creation
This commit is contained in:
parent
509423f1f1
commit
694c79a5bc
|
@ -41,13 +41,9 @@ let
|
||||||
ExecStartPre = pkgs.writeScript "github-hosts-sync-init" ''
|
ExecStartPre = pkgs.writeScript "github-hosts-sync-init" ''
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -euf
|
set -euf
|
||||||
|
install -m 0711 -o ${user.name} -d ${cfg.dataDir}
|
||||||
mkdir -p ${cfg.dataDir}
|
install -m 0700 -o ${user.name} -d ${cfg.dataDir}/.ssh
|
||||||
chown ${user.name}: ${cfg.dataDir}
|
install -m 0400 -o ${user.name} \
|
||||||
|
|
||||||
install \
|
|
||||||
-o ${user.name} \
|
|
||||||
-m 0400 \
|
|
||||||
${cfg.ssh-identity-file} \
|
${cfg.ssh-identity-file} \
|
||||||
${cfg.dataDir}/.ssh/${fileExtension cfg.ssh-identity-file}
|
${cfg.dataDir}/.ssh/${fileExtension cfg.ssh-identity-file}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user