Implement proper command for mounting and unmounting rclone
This commit is contained in:
parent
7693faf903
commit
f3e84b8e02
1 changed files with 10 additions and 1 deletions
|
@ -374,7 +374,16 @@ in {
|
|||
(lib.generators.toINI { } { ${name} = sync.config; });
|
||||
script = pkgs.writeShellScriptBin serviceName ''
|
||||
${sync.secretsScript}
|
||||
cat ${configFile}
|
||||
mkdir -p ${lib.escapeShellArg sync.path}
|
||||
mkdir -p /tmp/rclone
|
||||
${lib.getExe pkgs.rclone} mount --config ${configFile} ${name}: ${lib.escapeShellArg sync.path}
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
ExecStop =
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "${serviceName}-stop" ''
|
||||
furermount -zu ${sync.path}
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
|
|
Loading…
Reference in a new issue