Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ors-utils
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
ors-utils
Commits
8145ecb3
Commit
8145ecb3
authored
Aug 26, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add init.d scripts
parent
eefda9e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
init.d/init-sdr
init.d/init-sdr
+20
-0
init.d/init-ue
init.d/init-ue
+17
-0
init.d/keep-ue-alive.sh
init.d/keep-ue-alive.sh
+19
-0
No files found.
init.d/init-sdr
0 → 100755
View file @
8145ecb3
#!/bin/sh
### BEGIN INIT INFO
# Provides: Init SDR
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Init SDR
### END INIT INFO
case
"
$1
"
in
start
)
cd
/root/trx_sdr/kernel
;
make clean
;
bash init.sh 2>> /opt/amarisoft/init-sdr.log
>>
/opt/amarisoft/init-sdr.log
/opt/amarisoft/v2022-07-29/lteenb-linux-2022-07-29/lte_init.sh 2>> /opt/amarisoft/init-sdr.log
>>
/opt/amarisoft/init-sdr.log
;;
*
)
true
esac
init.d/init-ue
0 → 100755
View file @
8145ecb3
#!/bin/sh
### BEGIN INIT INFO
# Provides: Init UE
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Init UE
### END INIT INFO
case
"
$1
"
in
start
)
bash /opt/keep-ue-alive.sh 2>> /opt/keep-ue-alive.log
>>
/opt/keep-ue-alive.log &
;;
*
)
true
esac
init.d/keep-ue-alive.sh
0 → 100755
View file @
8145ecb3
#!/bin/bash
source
/etc/profile
log
()
{
echo
"[
$(
date
)
]
$@
"
;
}
while
true
;
do
if
!
systemctl is-active lte
;
then
log
"Starting lte service"
;
systemctl start lte
;
elif
!
ps aux|grep
-v
grep
|grep
-q
lteue
;
then
log
"Restarting lte service"
;
systemctl restart lte
;
elif
!
/root/ue/doc/ws.js 127.0.0.1:9002
'{"message": "ue_get"}'
|grep power_on|grep
-q
true
;
then
log
"Powering on UE"
;
/root/ue/doc/ws.js 127.0.0.1:9002
'{"message": "power_on", "ue_id": 1}'
;
fi
log
"Sleeping..."
;
sleep
10
;
done
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