Skip to content

Commit

Permalink
systemd startup for compatibility with Raspbian Stretch
Browse files Browse the repository at this point in the history
  • Loading branch information
daveake committed Aug 19, 2017
1 parent 6fd5097 commit 6088af6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 42 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -61,6 +61,11 @@ It is therefore possible to overlay downloaded images with telemetry data, as te

## Change Log ##

19/08/2017
==========

- Changed startup to use systemd

10/04/2017
==========

Expand Down
19 changes: 6 additions & 13 deletions build
Expand Up @@ -4,21 +4,14 @@ cd tracker
make
cd ..

# Crete folders for images
echo Creating folders for images
mkdir -p download/keep

# Copy configuration file to boot partition
echo Copying configuration file ...
sudo cp -f boot/pisky.txt /boot

# Copy and install startup script
echo Copying and enabling startup script.
echo Please ignore the LSB warning message
sudo cp init.d/tracker /etc/init.d
cd /etc/init.d
sudo chmod +x tracker
sudo update-rc.d tracker defaults
cd ~/pits
echo Enabling startup script.
sudo cp -f systemd/tracker.service /lib/systemd/system
sudo systemctl enable tracker.service

echo Starting startup script
sudo systemctl start tracker.service

echo DONE
25 changes: 0 additions & 25 deletions init.d/tracker

This file was deleted.

10 changes: 10 additions & 0 deletions systemd/tracker.service
@@ -0,0 +1,10 @@
[Unit]
Description=PITS Tracker Service

[Service]
ExecStart=/home/pi/pits/tracker/startup
StandardOutput=null

[Install]
WantedBy=multi-user.target
Alias=tracker.service
2 changes: 1 addition & 1 deletion tracker/lora.c
Expand Up @@ -414,7 +414,7 @@ void startReceiving(int LoRaChannel)
}
}

double BandwidthInKHz(Channel)
double BandwidthInKHz(int Channel)
{
if (Config.LoRaDevices[Channel].Bandwidth == BANDWIDTH_7K8) return 7.8;
if (Config.LoRaDevices[Channel].Bandwidth == BANDWIDTH_10K4) return 10.4;
Expand Down
3 changes: 0 additions & 3 deletions tracker/startup
@@ -1,8 +1,5 @@
#!/bin/bash
cd /home/pi/pits/tracker
sudo modprobe w1-gpio
sudo modprobe w1_therm
sudo modprobe i2c-dev
./send_aprs &
echo none | sudo tee /sys/class/leds/led0/trigger
echo 1 | sudo tee /sys/class/leds/led0/brightness
Expand Down

0 comments on commit 6088af6

Please sign in to comment.