tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
crashplan-small-business: remove unneeded function
Marti Serra
8 years ago
30f27c49
127cea92
+7
-22
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
backup
crashplan-small-business.nix
+7
-22
nixos/modules/services/backup/crashplan-small-business.nix
···
23
23
example = "2G";
24
24
type = types.str;
25
25
description = ''
26
26
-
Maximum amount of that the crashplan engine should use.
26
26
+
Maximum amount of ram that the crashplan engine should use.
27
27
'';
28
28
};
29
29
openPorts = mkOption {
···
52
52
after = [ "network.target" "local-fs.target" ];
53
53
54
54
preStart = ''
55
55
-
ensureDir() {
56
56
-
dir=$1
57
57
-
mode=$2
58
58
-
59
59
-
if ! test -e $dir; then
60
60
-
${pkgs.coreutils}/bin/mkdir -m $mode -p $dir
61
61
-
elif [ "$(${pkgs.coreutils}/bin/stat -c %a $dir)" != "$mode" ]; then
62
62
-
${pkgs.coreutils}/bin/chmod $mode $dir
63
63
-
fi
64
64
-
}
65
65
-
66
66
-
ensureDir ${crashplansb.vardir} 755
67
67
-
ensureDir ${crashplansb.vardir}/conf 700
68
68
-
ensureDir ${crashplansb.manifestdir} 700
69
69
-
ensureDir ${crashplansb.vardir}/cache 700
70
70
-
ensureDir ${crashplansb.vardir}/backupArchives 700
71
71
-
ensureDir ${crashplansb.vardir}/log 777
55
55
+
install -d -m 755 ${crashplansb.vardir}
56
56
+
install -d -m 700 ${crashplansb.vardir}/conf
57
57
+
install -d -m 700 ${crashplansb.manifestdir}
58
58
+
install -d -m 700 ${crashplansb.vardir}/cache
59
59
+
install -d -m 700 ${crashplansb.vardir}/backupArchives
60
60
+
install -d -m 777 ${crashplansb.vardir}/log
72
61
cp -avn ${crashplansb}/conf.template/* ${crashplansb.vardir}/conf
73
73
-
#for x in bin install.vars lang lib libc42archive64.so libc42core.so libjniwrap64.so libjtux64.so libleveldb64.so libnetty-tcnative.so share upgrade; do
74
74
-
# rm -f ${crashplansb.vardir}/$x;
75
75
-
# ln -sf ${crashplansb}/$x ${crashplansb.vardir}/$x;
76
76
-
#done
77
62
'';
78
63
79
64
serviceConfig = {