Was previously a cron, python & bash script. Now using systemd.
- On the pi, copy over
laundrycam.serviceandlaundrycam.timerinto their correct places. - On the pi, install
imagemagick. - On the pi, edit .ssh/config and add a host for fileserver. Like below:
Host fileserver
user laundrycam
HostName 10.x.x.x
- On the fileserver,
useradd laundrycam - On the pi, upload the SSH private key or generate a new pair with
ssh-keygen - On the fileserver, edit the
.ssh/authorized_keysfor the laundrycam user, like below:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyPtsnO+/mohi2qJaxzG4hKWMO45CVbcHiocSx7aQnV command="/usr/bin/rsync",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty eshc@laundrycam
- Create a directory in
/var/www/fileserverand chown it to the laundrycam user - On pi,
sudo systemctl enable --now laundrycam.timer - On pi, after a few seconds,
sudo systemctl status laundrycamand check no errors.