forked from lix-project/hydra
hydra-module: /var/lib/hydra -> ${baseDir}
This commit is contained in:
parent
14090fbb86
commit
4a441b54ce
|
@ -436,12 +436,12 @@ in
|
||||||
if [ $(systemctl is-active $service) == active ]; then
|
if [ $(systemctl is-active $service) == active ]; then
|
||||||
echo "stopping $service due to lack of free space..."
|
echo "stopping $service due to lack of free space..."
|
||||||
systemctl stop $service
|
systemctl stop $service
|
||||||
date > /var/lib/hydra/.$service-stopped-minspace
|
date > ${baseDir}/.$service-stopped-minspace
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $spaceleft -gt $(( ($minFreeGB + 10) * 1024**3)) -a \
|
if [ $spaceleft -gt $(( ($minFreeGB + 10) * 1024**3)) -a \
|
||||||
-r /var/lib/hydra/.$service-stopped-minspace ] ; then
|
-r ${baseDir}/.$service-stopped-minspace ] ; then
|
||||||
rm /var/lib/hydra/.$service-stopped-minspace
|
rm ${baseDir}/.$service-stopped-minspace
|
||||||
echo "restarting $service due to newly available free space..."
|
echo "restarting $service due to newly available free space..."
|
||||||
systemctl start $service
|
systemctl start $service
|
||||||
fi
|
fi
|
||||||
|
@ -460,8 +460,8 @@ in
|
||||||
{ path = [ pkgs.bzip2 ];
|
{ path = [ pkgs.bzip2 ];
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
find /var/lib/hydra/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
|
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
|
||||||
find /var/lib/hydra/runcommand-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
|
find ${baseDir}/runcommand-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
|
||||||
'';
|
'';
|
||||||
startAt = "Sun 01:45";
|
startAt = "Sun 01:45";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue