Closed Kobtul closed 3 years ago
I have created systemd service:
[Unit] Description=tpfancontrol-rs [Service] Type=oneshot User=root Environment="RUST_BACKTRACE=1" ExecStart=/home/kobi/github/tpfancontrol-rs/target/release/tpfancontrol & [Install] WantedBy=multi-user.target
however service fails with:
● tpfancontrol-rs.service - tpfancontrol-rs Loaded: loaded (/etc/systemd/system/tpfancontrol-rs.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2021-03-15 11:54:24 CET; 5min ago Process: 65399 ExecStart=/home/kobi/github/tpfancontrol-rs/target/release/tpfancontrol & (code=exited, status=101) Main PID: 65399 (code=exited, status=101) bře 15 11:54:24 pop-os tpfancontrol[65399]: 2: core::result::unwrap_failed bře 15 11:54:24 pop-os tpfancontrol[65399]: at ./build/rustc-n7HJ8w/rustc-1.47.0+dfsg1+llvm/library/core/src/result.rs:1220 bře 15 11:54:24 pop-os tpfancontrol[65399]: 3: cursive::backend::termion::Backend::init bře 15 11:54:24 pop-os tpfancontrol[65399]: 4: cursive::cursive::Cursive::termion bře 15 11:54:24 pop-os tpfancontrol[65399]: 5: tpfancontrol::main bře 15 11:54:24 pop-os tpfancontrol[65399]: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. bře 15 11:54:24 pop-os tpfancontrol[65399]: [6B blob data] bře 15 11:54:24 pop-os systemd[1]: tpfancontrol-rs.service: Main process exited, code=exited, status=101/n/a bře 15 11:54:24 pop-os systemd[1]: tpfancontrol-rs.service: Failed with result 'exit-code'. bře 15 11:54:24 pop-os systemd[1]: Failed to start tpfancontrol-rs.
Can you please help me to run the binary at boot using systemd?
It's a TUI. It can't run headless. It needs to run on an actual tty.
I have created systemd service:
however service fails with:
Can you please help me to run the binary at boot using systemd?