Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
e8cdf6d1
Commit
e8cdf6d1
authored
Oct 27, 2020
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/etc/init.d: count number of radiusvlan (re)starts
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
f5af11d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
radiusvlan.sh
userspace/rootfs_override/etc/init.d/radiusvlan.sh
+12
-0
No files found.
userspace/rootfs_override/etc/init.d/radiusvlan.sh
View file @
e8cdf6d1
...
...
@@ -2,6 +2,17 @@
dotconfig
=
/wr/etc/dot-config
start_counter
()
{
# increase start counter
COUNTER_FILE
=
"/tmp/start_cnt_rvlan"
START_COUNTER
=
1
if
[
-f
"
$COUNTER_FILE
"
]
;
then
read
-r
START_COUNTER <
$COUNTER_FILE
START_COUNTER
=
$((
START_COUNTER+1
))
fi
echo
"
$START_COUNTER
"
>
$COUNTER_FILE
}
start
()
{
if
[
-f
$dotconfig
]
;
then
.
$dotconfig
...
...
@@ -37,6 +48,7 @@ start() {
echo
"Failed (already running?)"
else
eval
/wr/bin/radiusvlan
$LOGPIPE
\&
start_counter
echo
"OK"
fi
}
...
...
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