mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
nextcloud: Minor changes to cron timer units
- Add documentation URL for Nextcloud cron.php. - Use '-f' flag to php to match what documentation recommends. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
d7b05385c6
commit
0f663f8381
@ -255,17 +255,21 @@ def _configure_ldap():
|
||||
def _configure_systemd():
|
||||
"""Create systemd units files for container and cron jobs."""
|
||||
# Create service and timer for running periodic php jobs.
|
||||
doc = 'https://docs.nextcloud.com/server/stable/admin_manual/' \
|
||||
'configuration_server/background_jobs_configuration.html#systemd'
|
||||
nextcloud_cron_service_content = f'''
|
||||
[Unit]
|
||||
Description=Nextcloud cron.php job
|
||||
Documentation={doc}
|
||||
|
||||
[Service]
|
||||
ExecCondition=/usr/bin/podman exec --user www-data {CONTAINER_NAME} /var/www/html/occ status -e
|
||||
ExecStart=/usr/bin/podman exec --user www-data {CONTAINER_NAME} php /var/www/html/cron.php
|
||||
ExecStart=/usr/bin/podman exec --user www-data {CONTAINER_NAME} php -f /var/www/html/cron.php
|
||||
KillMode=process
|
||||
''' # noqa: E501
|
||||
nextcloud_cron_timer_content = '''[Unit]
|
||||
Description=Run Nextcloud cron.php every 5 minutes
|
||||
Documentation={doc}
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user