add files and ebooks scan

master
Paul Walko 2021-01-09 13:17:54 -05:00
parent 3132c5072f
commit 10eec6df13
3 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,9 @@
[Unit]
Description=Nextcloud cron
Description=Nextcloud cron and scan for any new ebooks
[Service]
Type=simple
ExecStart=/usr/bin/podman exec nextcloud /bin/bash -c "if ! command -v sudo &> /dev/null; then apt-get update && apt-get install -y sudo; fi; sudo -u www-data php -f /var/www/html/cron.php"
ExecStart=/usr/bin/podman exec nextcloud /bin/bash -c "if ! command -v sudo &> /dev/null; then apt-get update && apt-get install -y sudo; fi; sudo -u www-data php -f /var/www/html/cron.php && sudo -u www-data /var/www/html/occ files:scan --path='/pew/files/ebooks'"
[Install]
WantedBy=default.target

View File

@ -56,6 +56,7 @@ up () {
systemctl start --user nextcloud-redis || systemctl restart --user nextcloud-redis
systemctl enable --user nextcloud-redis
# Setup nextcloud cron and continuous scanning for new files
cp nextcloud-cron.service nextcloud-cron.timer $HOME/.config/systemd/user/
systemctl start --user nextcloud-cron.timer || systemctl restart --user nextcloud-cron.timer
systemctl enable --user nextcloud-cron.timer

View File

@ -16,6 +16,7 @@ up () {
--env SUBDOMAINS=airsonic,git,jf,nc,plex \
--env VALIDATION=http \
--env EMAIL=paulsw.pw@gmail.com \
--volume /bigdata/files:/files:ro \
--volume /bigdata/k8s-config/nginx/config:/config:rw \
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
--volume /bigdata/k8s-config/nginx/ssl.conf:/config/nginx/ssl.conf:ro \