Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
firmware
Gluon SSID Changer
Commits
4960ba59
Commit
4960ba59
authored
Aug 28, 2017
by
rubo77
Browse files
shorter uptime determination
parent
e8e3fd98
Changes
1
Hide whitespace changes
Inline
Side-by-side
gluon-ssid-changer/files/lib/gluon/ssid-changer/ssid-changer.sh
View file @
4960ba59
...
...
@@ -8,7 +8,8 @@ safety_exit() {
exit
2
}
pgrep
-f
autoupdater
>
/dev/null
&&
safety_exit
'autoupdater running'
[
$(
cat
/proc/uptime |
sed
's/\..*//g'
)
-gt
60
]
||
safety_exit
'less than one minute'
UT
=
$(
sed
's/\..*//g'
/proc/uptime
)
[
$UT
-gt
60
]
||
safety_exit
'less than one minute'
[
$(
find /var/run
-name
hostapd-phy
*
|
wc
-l
)
-gt
0
]
||
safety_exit
'no hostapd-phy*'
# only once every timeframe minutes the SSID will change to the Offline-SSID
...
...
@@ -101,7 +102,7 @@ else
CHECK
=
"
$(
batctl gwl
-H
|grep
-v
"gateways in range"
|wc
-l
)
"
fi
UP
=
$((
$
(
cat
/proc/uptime |
sed
's/\..*//g'
)
/
60
))
UP
=
$((
$
UT
/
60
))
M
=
$((
$UP
%
$MINUTES
))
HUP_NEEDED
=
0
...
...
Write
Preview
Markdown
is supported
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