You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Just wanted to let you know how I did systemd. Just a suggestion, there might be even more native methods.
root@acerola:~# cat /etc/systemd/system/radioclkd2.service
[Unit]
Description=Radio Clock service
Before=chrony.service
[Service]
EnvironmentFile=/etc/default/radioclkd2
ExecStart=
ExecStart=/usr/local/bin/radioclkd2 $OPTS
[Install]
WantedBy=multi-user.target
Alias=radioclkd2
root@acerola:~# cat /etc/systemd/system/radioclkd2.service.d/set-gpio.conf
[Service]
ExecStartPre=/usr/local/bin/setgpio.sh 13
root@acerola:~# cat /usr/local/bin/setgpio.sh
#!/bin/sh
if [ ! -f /sys/class/gpio/gpio$1/value ]; then
echo $1 > /sys/class/gpio/export
fi
echo both > /sys/class/gpio/gpio$1/edge
I also adjusted some things in main.c; because I don't want to daemonize for systemd. Maybe there's a better way to integrate into systemd more natively.
Hi, Just wanted to let you know how I did systemd. Just a suggestion, there might be even more native methods.
I also adjusted some things in main.c; because I don't want to daemonize for systemd. Maybe there's a better way to integrate into systemd more natively.
I run 3x https://github.com/beta-tester/RPi-GPS-PPS-StratumOne boxes with radioclkd2 added to it, pics https://imgur.com/a/CLW7pzF
The text was updated successfully, but these errors were encountered: