Hello,
I have the following service
$this->bbcode_second_pass_code('', '/etc/systemd/system/wxdb.service
[Unit]
Description=wxdb
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'cp /home/weewx/archive/weewx.sdb /home/weewx/archive/wxbkp.sdb.$(date +"%F")'
ExecStart=/usr/bin/bash -c 'tar -czf /home/weewx/archive/wxbkp.$(date +"%F").tar.gz /home/weewx/archive/wxbkp.sdb.$(date +"%F")'
ExecStart=/usr/bin/bash -c 'rsync /home/weewx/archive/wxbkp.$(date +"%F").tar.gz -e ssh user@hostname:/home/db'
ExecStart=/usr/bin/bash -c 'rm /home/weewx/archive/wxbkp.sdb.$(date +"%F") /home/weewx/archive/wxbkp.$(date +"%F").tar.gz'
')
which is started by timer:
$this->bbcode_second_pass_code('', '[Unit]
Description=wxdb.service
[Timer]
OnCalendar=*-*-* 14:38:00
Persistent=true
[Install]
WantedBy=timers.target
')
I have exactly the same on two R-Pis and it worked for quite a while on R-Pi1 without a problem but it no longer does, on R-Pi2 it works as expected.
on R-Pi1 I get the following error:
$this->bbcode_second_pass_code('', '/etc/systemd/system/wxdb.service:6: Failed to resolve unit specifiers in cp /home/weewx/archive/weewx.sdb /home/weewx/archive/wxbkp.sdb.$(date +"%F"): Invalid slot
wxdb.timer: Refusing to start, unit to trigger not loaded.
Failed to start wxdb.service.')
I wonder if this has something to do with updating R-Pi1 which runs:
Linux alarmpi 4.14.52-1-ARCH #1 SMP Thu Jun 28 00:44:47 UTC 2018 armv6l GNU/Linux
whereas R-Pi2 is: Linux alarmpi 4.9.61-1-ARCH #1 SMP Sun Nov 12 00:26:55 UTC 2017 armv6l GNU/Linux
From what it seems it doesn't like something about the specified parameters but I'm really not sure what the issue is. Any clues?!