I created a system service file the I want to execute a command whenever the program stops running or or computer restarts.
I want "pocket start" to run always. When I type it in the terminal, it kicks off a job that runs in the background that syncs to a blockchain.
Here's what I've done so far:
sudo nano /etc/systemd/system/pokt.service
Then entered the following:
[Unit]
Description=Pokt Client
After=network.target
Wants=network.target
[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart="pocket start"
[Install]
WantedBy=multi-user.target
whenever I start the service using:
sudo systemctl start pokt.service
and check the status, this is the error I get:
● pokt.service - Pokt Client
Loaded: loaded (/etc/systemd/system/pokt.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2022-04-23 12:16:35 CDT; 1s ago
Process: 10361 ExecStart=pocket start (code=exited, status=203/EXEC)
Main PID: 10361 (code=exited, status=203/EXEC)
CPU: 1ms
Not quite sure what I'm doing wrong. I'm running ubuntu 22.04