Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
picard
packages
Commits
d1d179bd
Commit
d1d179bd
authored
May 01, 2013
by
Tim Niemeyer
Browse files
Fixed logging url and file cleanup
parent
20ec98ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
ath9k-watchdog/files/ath9k-watchdog-pm
View file @
d1d179bd
#!/bin/sh
# Save log
mkdir
-p
/usr/lib/ath9k-watchdog
UPLOAD_URL
=
'
http://[$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)]/ath9k-crash/
'
UPLOAD_URL
=
"
http://[
$(
uci get configurator.@api[0].ipv6_address
)
%
$(
uci get configurator.@api[0].ipv6_interface
)
]/ath9k-crash/
"
WGETC
=
$(
which wget
)
# CD to avoid annoying prefixes
cd
/usr/lib/ath9k-watchdog
#Poll directory every
1
0 secs
#Poll directory every
6
0 secs
while
[
1
=
1
]
do
for
f
in
$(
ls
.
)
;
do
$WGETC
-q
$UPLOAD_URL
?
$(
cat
$f
)
-O
-
&&
rm
$f
done
sleep
1
0
sleep
6
0
# If there are more than 15 files, assume that files cannot be uploaded
# Delete oldest files in order to avoid jffs-overflow
ls
-t
|
sed
-e
'1,15d'
| xargs
-d
'\n'
rm
2> /dev/null
ls
-t
|
sed
-e
'1,15d'
| xargs
rm
2> /dev/null
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment