I can run oxidized from the cli without a problem. I copy the oxidized.service to the /lib/systemd/system
I’m able to find where the oxidized is install. by running which oxidized
[root@dev-oxidized bin]# which oxidized
/usr/local/rvm/gems/ruby-2.3.8/bin/oxidized
I modify the variables on the oxidized.service put point to oxidized
[root@dev-oxidized bin]# cat /lib/systemd/system/oxidized.service
#For debian 8 put it in /lib/systemd/system/
#To set OXIDIZED_HOME instead of the default:
~${oxidized_user}/.config/oxidized in debian 8, then uncomment
#(and modify as required) the “Environment” variable below so
#systemd sets the correct environment. Tested only on Debian 8.8.
#YMMV otherwise.
#For RHEL / CentOS 7 put it in /etc/systemd/system/
#and call it with systemctl start oxidized.service
[Unit]
Description=Oxidized - Network Device Configuration Backup Tool
After=network-online.target multi-user.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/rvm/gems/ruby-2.3.8/bin/oxidized
User=root
KillSignal=SIGKILL
Environment=“OXIDIZED_HOME=/root/.config/oxidized”
Restart=on-failure
RestartSec=300s
[Install]
WantedBy=multi-user.target
I can do systemctl start oxidized and I get no error, but when I do systemctl status oxidized i receive the following.
[root@dev-oxidized bin]# systemctl status oxidized
● oxidized.service - Oxidized - Network Device Configuration Backup Tool
Loaded: loaded (/usr/lib/systemd/system/oxidized.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-02-20 18:50:56 EST; 1min 18s ago
Process: 4708 ExecStart=/usr/local/rvm/gems/ruby-2.3.8/bin/oxidized (code=exited, status=127)
Main PID: 4708 (code=exited, status=127)
Feb 20 18:50:56 dev-oxidized systemd[1]: oxidized.service: main process exited, code=exited, status=127/n/a
Feb 20 18:50:56 dev-oxidized systemd[1]: Unit oxidized.service entered failed state.
Feb 20 18:50:56 dev-oxidized systemd[1]: oxidized.service failed.
Not sure what am I missing. Any pointers would be appreciated.