forked from ffulm/firmware
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #30 from ffbsee/developement
Stable Release 0.7.0
- Loading branch information
Showing
142 changed files
with
41,562 additions
and
2,234 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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
.directory | ||
*/.directory | ||
**/.directory | ||
**.directory | ||
**.png | ||
**.jpeg | ||
**.jpg | ||
**.swp | ||
**.gif |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#check for new firmware every 6 hours | ||
# Check for new firmware every 6 hours | ||
0 */6 * * * /usr/sbin/autoupdater | ||
#publish map data | ||
# Publish map data | ||
*/5 * * * * /usr/sbin/print_map.sh -p | ||
#publish service data | ||
# Publish service data | ||
*/5 * * * * /usr/sbin/print_service.sh -p | ||
#reboot every 5 days at 04:05 | ||
# Reboot every 5 days at 04:05 | ||
5 4 */5 * * /sbin/reboot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Keep ssh keys on sysupgrade | ||
/etc/uhttpd.crt | ||
/etc/uhttpd.key |
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
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,25 @@ | ||
#!/bin/sh | ||
|
||
# Calculate up/down speed and record data volume on given network interfaces. | ||
|
||
net="$1" | ||
td="$2" | ||
|
||
if [ -n "$net" -a -n "$td" ]; then | ||
bytes1="$(cat /var/${td}_data_${net} 2> /dev/null)" | ||
time1="$(date +%s -r /var/${td}_data_${net} 2> /dev/null)" | ||
|
||
bytes2="$(cat /sys/class/net/$net/statistics/${td}_bytes)" | ||
time2="$(date +%s)" | ||
|
||
# Only calculate new speed after at least one second has passed | ||
if [ "$time1" != "$time2" ]; then | ||
# Remember data volume for next time | ||
echo -n "$bytes2" > /var/${td}_data_${net} | ||
fi | ||
|
||
speed="$(expr \( $bytes2 - $bytes1 \) / \( $time2 - $time1 \) 2> /dev/null)" | ||
echo "${speed:-0}" | ||
else | ||
echo "Usage: $0 <interface> [tx|rx]" | ||
fi |
Oops, something went wrong.