first commit with existing files
This commit is contained in:
15
nccron_deprecated/cron.sh
Normal file
15
nccron_deprecated/cron.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo -n "Container name: "
|
||||
|
||||
read cont
|
||||
|
||||
sudo cp ./files/nccron.service /etc/systemd/system/nccron.service
|
||||
sudo cp ./files/nccron.timer /etc/systemd/system/nccron.timer
|
||||
|
||||
sudo sed -i "s/%1%/$cont/g" /etc/systemd/system/nccron.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now nccron.timer
|
||||
7
nccron_deprecated/files/nccron.service
Normal file
7
nccron_deprecated/files/nccron.service
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Nextcloud cron.php job
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/bin/docker exec --user www-data %1% php /var/www/html/cron.php
|
||||
KillMode=process
|
||||
10
nccron_deprecated/files/nccron.timer
Normal file
10
nccron_deprecated/files/nccron.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run Nextcloud cron.php every 5 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=5min
|
||||
Unit=nccron.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user