maco2035 / DiyHeliumHotspots

Here is a guide to build your own hotspots!
98 stars 52 forks source link

Issue with Auto Start Script #7

Closed GreenBear33 closed 4 years ago

GreenBear33 commented 4 years ago

Hi,

I am trying to set up the auto start script with the following:

[Unit]
Description=LoRa Packet Forwarder
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
WorkingDirectory=~/packet_forwarder/lora_pkt_fwd
ExecStart=~/packet_forwarder/lora_pkt_fwd/lora_pkt_fwd -c ~/packet_forwarder/lora_pkt_fwd/global_conf.json
Restart=always
RestartSec=30
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=lora_pkt_fwd
User=pi

[Install]
WantedBy=multi-user.target

When I reboot and check status I get the following:

● lora_pkt_fwd.service - LoRa Packet Forwarder
   Loaded: bad-setting (Reason: Unit lora_pkt_fwd.service has a bad unit file setting.)
   Active: inactive (dead)

Could you let me know what I am doing wrong please?

GreenBear33 commented 4 years ago

I figured it out. Thanks for the great tutorial.