13 lines
446 B
Bash
13 lines
446 B
Bash
|
#!/usr/bin/env bash
|
||
|
(
|
||
|
flock 9
|
||
|
if [ -e /var/cache/paperless-ngx/lastcheck ] && [ "$(cat /var/cache/paperless-ngx/lastcheck)" == "$(date +%y%m%d)" ]
|
||
|
then
|
||
|
echo allready check today
|
||
|
else
|
||
|
python3 -m venv /var/cache/paperless-ngx/python-venv
|
||
|
/var/cache/paperless-ngx/python-venv/bin/pip3 install -r /usr/share/paperless-ngx/requirements.txt
|
||
|
date +%y%m%d > /var/cache/paperless-ngx/lastcheck
|
||
|
fi
|
||
|
) 9>python3 -m venv /tmp/paperless-ngx-python-venv
|