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
|
||||
echo "stopping $service due to lack of free space..."
|
||||
systemctl stop $service
|
||||
date > /var/lib/hydra/.$service-stopped-minspace
|
||||
date > ${baseDir}/.$service-stopped-minspace
|
||||
fi
|
||||
else
|
||||
if [ $spaceleft -gt $(( ($minFreeGB + 10) * 1024**3)) -a \
|
||||
-r /var/lib/hydra/.$service-stopped-minspace ] ; then
|
||||
rm /var/lib/hydra/.$service-stopped-minspace
|
||||
-r ${baseDir}/.$service-stopped-minspace ] ; then
|
||||
rm ${baseDir}/.$service-stopped-minspace
|
||||
echo "restarting $service due to newly available free space..."
|
||||
systemctl start $service
|
||||
fi
|
||||
|
@ -460,8 +460,8 @@ in
|
|||
{ path = [ pkgs.bzip2 ];
|
||||
script =
|
||||
''
|
||||
find /var/lib/hydra/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}/build-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";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue