I'd like to get into creating custom services on FreeBSD. I want to keep them as-simple as possible (I looked at MariaDB's and found it way more complex than I assumed it'd be, but maybe there's other examples?)
On Linux, I had a Friendica worker daemon with a systemd script:
And timer to run it every 5 mins:
On Linux, I had a Friendica worker daemon with a systemd script:
Code:
[Service]
User=nginx
Group=nginx
Type=oneshot
WorkingDirectory=/var/www/social
ExecStart='/usr/bin/php' '/var/www/social/bin/worker.php'
ExecStartPost='/usr/bin/sync'
And timer to run it every 5 mins:
Code:
[Unit]
Description=friendica Worker Daemon
After=network-online.target
Wants=network-online.target
[Timer]
OnBootSec=5m
OnUnitActiveSec=5m
[Install]
WantedBy=timers.target