So, I am trying to set a systemd unit in order to make megaCMD (from Mega cloud) starts automatically at boot, but I am facing some problems.
Below is the unit I created (mega-cmd.service):
[Unit] Description=Mega-CMD systemd service After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=on-failure RestartSec=1 User=pi ExecStart=/usr/bin/mega-cmd-server [Install] WantedBy=multi-user.target
systemctl status mega-cmd returns some errors:
Loaded: loaded (/etc/systemd/system/mega-cmd.service; enabled; preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2022-12-16 17:56:59 -03; 76ms ago Process: 627154 ExecStart=/usr/bin/mega-cmd-server (code=exited, status=217/USER) Main PID: 627154 (code=exited, status=217/USER) CPU: 2ms
And so the unit is never started. Anyone has some idea about how to solve this issue please?
Thanks in advance.