Commit ee7c3fa0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

check_updated_repo: run update if repo info older than 1 day

parent 13176b37
#!/bin/sh
#
# Copyright (C) 2014 Etersoft
# Copyright (C) 2014 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2014, 2015 Etersoft
# Copyright (C) 2014, 2015 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
......@@ -24,6 +24,8 @@ __is_repo_info_download()
if [ -r /var/cache/apt ] ; then
# FIXME: only if root permissions
test -r /var/cache/apt/pkgcache.bin || return
# if repo older than 1 day, return false
test -n "$(find /var/cache/apt/pkgcache.bin -ctime +1)" || return
fi
;;
*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment