crashplan-small-business: remove unneeded function

+7 -22
+7 -22
nixos/modules/services/backup/crashplan-small-business.nix
··· 23 23 example = "2G"; 24 24 type = types.str; 25 25 description = '' 26 - Maximum amount of that the crashplan engine should use. 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 - ensureDir() { 56 - dir=$1 57 - mode=$2 58 - 59 - if ! test -e $dir; then 60 - ${pkgs.coreutils}/bin/mkdir -m $mode -p $dir 61 - elif [ "$(${pkgs.coreutils}/bin/stat -c %a $dir)" != "$mode" ]; then 62 - ${pkgs.coreutils}/bin/chmod $mode $dir 63 - fi 64 - } 65 - 66 - ensureDir ${crashplansb.vardir} 755 67 - ensureDir ${crashplansb.vardir}/conf 700 68 - ensureDir ${crashplansb.manifestdir} 700 69 - ensureDir ${crashplansb.vardir}/cache 700 70 - ensureDir ${crashplansb.vardir}/backupArchives 700 71 - ensureDir ${crashplansb.vardir}/log 777 55 + install -d -m 755 ${crashplansb.vardir} 56 + install -d -m 700 ${crashplansb.vardir}/conf 57 + install -d -m 700 ${crashplansb.manifestdir} 58 + install -d -m 700 ${crashplansb.vardir}/cache 59 + install -d -m 700 ${crashplansb.vardir}/backupArchives 60 + install -d -m 777 ${crashplansb.vardir}/log 72 61 cp -avn ${crashplansb}/conf.template/* ${crashplansb.vardir}/conf 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 - # rm -f ${crashplansb.vardir}/$x; 75 - # ln -sf ${crashplansb}/$x ${crashplansb.vardir}/$x; 76 - #done 77 62 ''; 78 63 79 64 serviceConfig = {