I also just run it as a service under systemd. ? I found an elegant solution is to have a program called ¡°tmux¡± (terminal multiplexer) ?call it up and launch it. ?Then, after it auto run, I can see it action both locally or remotely by ssh using ¡°tmux¡±.
My systemd file:
pi@RPi3-DireWolf:~ $ sudo cat /etc/systemd/system/direwolf.service
#####
[Unit]
Description=Direwolf
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/tmux new-session -d -s direwolf '/usr/local/bin/direwolf -c /home/pi/direwolf.conf'
Restart=always
[Install]
WantedBy=default.target
######
Then, after its running in background, I can see it by:
$ sudo tmux attach -t direwolf
To save keystrokes. I made it a command called ¡°tmx¡±
pi@RPi3-DireWolf:~ $ cat tmx
sudo tmux attach -t direwolf
¡ª¡ª¡ª
toggle quoted message
Show quoted text
On Mar 3, 2024, at 6:49?PM, The Doctor [412/724/301/703/415/510] <drwho@...> wrote:
?On Sunday, March 3rd, 2024 at 14:56, Benson via groups.io <benson@...> wrote:
I'm no closer to finding the answer unfortunately.? Editing the crontab, I use:? 'crontab -e' Also, I'm running cron as me, not root (I did test with root early on, but no longer).? Adding 'bash -c' to the cronjob did not work.? Like I mentioned, I can start dw-start.sh just fine at the command line.?? direwolf.conf is set to use CLI mode, not auto.
When you say that you're running cron as you, what do you mean?? What username do you log in
with?? pi (the default)?? Did you create a new account for yourself, or rename the 'pi' account?
Just out of curiosity, what hapens if you run this?
sudo -u btw crontab -e
?
@reboot /usr/local//bin/direwolf /path/to/your/direwolf.conf >/dev/null 2>&1?I don't think this will work if I'm just using a terminal window, will it?
It will.? What that will do is tell crond to run direwolf when the system boots up
(and, as far as I can tell from using that trick under other contexts, only when the
system boots, and not when, say. crond is restarted).
The Doctor [412/724/301/703/415/510]
WWW: https://drwho.virtadpt.net/
Don't be mean. You don't have to be mean.