CronCats / croncat-rs

A Rust version of the CronCat agent.
GNU Affero General Public License v3.0
19 stars 5 forks source link

System service file seems to miss `[Unit]` section #123

Open mikedotexe opened 1 year ago

mikedotexe commented 1 year ago

I'm on an Ubuntu 20 server running the main branch.

As shown here:

Screen Shot 2023-05-15 at 12 55 39 PM

This is a situation after running the setup-service command.

I compared this to the system service file for the Osmosis RPC, and noticed it's missing the [Unit] section.

Screen Shot 2023-05-15 at 12 58 03 PM

Update:

to get this going I modified the file to be:

+ [Unit]
Description=croncatd osmo-test-5 agent
After=multi-user.target

[Service]
+ Environment=CRONCAT_CHAIN_ID=osmo-test-5
+ Environment=CRONCAT_AGENT=newme
Type=simple
User=root
- WorkingDirectory=/root/.croncatd/system-services
+ WorkingDirectory=/root/croncat-rs
ExecStart=/root/croncat-rs/target/debug/croncatd go
StandardOutput=append:/var/log/croncatd-osmo-test-5.log
StandardError=append:/var/log/croncatd-osmo-test-5-error.log
Restart=on-failure
RestartSec=60
KillSignal=SIGINT
TimeoutStopSec=45
KillMode=mixed

[Install]
WantedBy=multi-user.target

Then was able to see the logs act normal with:

tail /var/log/croncatd-osmo-test-5-error.log -f

A little odd that the error file is showing normal logs? I dunno, nbd

Screen Shot 2023-05-15 at 1 33 25 PM