-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #446 from kdknigga/master
convert from sysv init to systemd for the crash recovery benefits. Fixes #445.
- Loading branch information
Showing
4 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Stratux | ||
After=network.target | ||
|
||
[Service] | ||
ExecStartPre=/root/stratux-pre-start.sh | ||
ExecStart=/usr/bin/gen_gdl90 | ||
ExecStop=pkill dump1090 | ||
KillMode=process | ||
Restart=always | ||
RestartSec=5 | ||
LimitCORE=1073741824 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
echo powersave >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | ||
|
||
# Check if we need to run an update. | ||
if [ -e /root/update*stratux*v*.sh ] ; then | ||
UPDATE_SCRIPT=`ls -1t /root/update*stratux*v*.sh | head -1` | ||
if [ -n "$UPDATE_SCRIPT" ] ; then | ||
# Execute the script, remove it, then reboot. | ||
echo | ||
echo "Running update script ${UPDATE_SCRIPT}..." | ||
sh ${UPDATE_SCRIPT} | ||
rm -f $UPDATE_SCRIPT | ||
reboot | ||
fi | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters