Fix shellcheck
This commit is contained in:
parent
80e9cd487a
commit
b1b6f77ca7
@ -8,10 +8,13 @@ let
|
|||||||
pkgs.systemd
|
pkgs.systemd
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "Need exactly one argument, the path to backup.";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
echo "Starting backup.";
|
echo "Starting backup.";
|
||||||
path="$(systemd-escape -u --path ''${1})";
|
path="$(systemd-escape -u --path \"$1\")";
|
||||||
restic backup "$path";
|
restic backup "$path";
|
||||||
restic forget -d 7 -w 4 -m 6 --keep-within 1d --prune
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user