chruby
chruby
For systemd services, this should be sufficient:
[Service] User=slack Group=slack WorkingDirectory=/home/slack/porridge/daemon # sbin shouldn't be needed if you are running as a normal user # Environment="PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" Environment="PATH=/bin:/usr/bin:/usr/local/bin" # I have had "chruby-exec[157986]: zsh:1: command not found: chruby" when using zsh Environment="SHELL=/bin/bash" ExecStart=chruby-exec 3.0.3 -- /home/slack/porridge/weather/bin/weatherd # This worked for some services but threw gem errors for others # ExecStart=/opt/rubies/ruby-3.0.3/bin/ruby /home/slack/porridge/weather/bin/weatherd
See instructions for cron, congifuring systemd environment and setting PATH for systemd.
chruby.txt · Last modified: 2023/02/11 10:28 by slack