nextcloud weekly rescan
This commit is contained in:
parent
5a9716b0ff
commit
b52030b830
5 changed files with 23 additions and 2 deletions
4
bundles/nextcloud/files/rescan
Normal file
4
bundles/nextcloud/files/rescan
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
php /opt/nextcloud/occ files:scan-app-data
|
||||||
|
php /opt/nextcloud/occ preview:generate-all
|
|
@ -80,6 +80,15 @@ files = {
|
||||||
'directory:/etc/nextcloud',
|
'directory:/etc/nextcloud',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'/opt/nextcloud/rescan': {
|
||||||
|
'owner': 'www-data',
|
||||||
|
'group': 'www-data',
|
||||||
|
'mode': '550',
|
||||||
|
'needs': [
|
||||||
|
'directory:/opt/nextcloud',
|
||||||
|
'action:extract_nextcloud',
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# SETUP
|
# SETUP
|
||||||
|
|
|
@ -68,8 +68,14 @@ defaults = {
|
||||||
},
|
},
|
||||||
'systemd-timers': {
|
'systemd-timers': {
|
||||||
'nextcloud-cron': {
|
'nextcloud-cron': {
|
||||||
'command': '/usr/bin/sudo -u www-data /usr/bin/php -f /opt/nextcloud/cron.php',
|
'command': '/usr/bin/php -f /opt/nextcloud/cron.php',
|
||||||
'when': '*:0/5',
|
'when': '*:0/5',
|
||||||
|
'user': 'www-data',
|
||||||
|
},
|
||||||
|
'nextcloud-rescan': {
|
||||||
|
'command': '/opt/nextcloud/rescan',
|
||||||
|
'when': 'Sun 00:00:00',
|
||||||
|
'user': 'www-data',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'zfs': {
|
'zfs': {
|
||||||
|
|
|
@ -28,6 +28,7 @@ def systemd(metadata):
|
||||||
'Description': f'{name} timer service',
|
'Description': f'{name} timer service',
|
||||||
},
|
},
|
||||||
'Service': {
|
'Service': {
|
||||||
|
'User': config.get('user', 'root'),
|
||||||
'ExecStart': config['command'],
|
'ExecStart': config['command'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,8 +6,9 @@ defaults = {
|
||||||
},
|
},
|
||||||
'systemd-timers': {
|
'systemd-timers': {
|
||||||
'tasmota-charge': {
|
'tasmota-charge': {
|
||||||
'command': f'/usr/bin/sudo -u tasmota-charge /opt/tasmota-charge',
|
'command': f'/opt/tasmota-charge',
|
||||||
'when': 'minutely',
|
'when': 'minutely',
|
||||||
|
'user': 'tasmota-charge',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue