Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
陈伟灿
k-sdk
Commits
2d71ac7f
Commit
2d71ac7f
authored
Sep 17, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
184125dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
process_check.sh
process_check.sh
+21
-0
rc.local
rc.local
+33
-0
No files found.
process_check.sh
0 → 100644
View file @
2d71ac7f
#!/bin/sh
#判断进程是否存在,如果不存在就启动它
while
true
do
sleep
30
PIDS
=
`
ps|grep kk_midware |grep
-v
grep
|
awk
'{print $1}'
`
if
[
"
$PIDS
"
!=
""
]
;
then
echo
"kk_midware is runing!"
else
/home/kk/kk_midware
>
/dev/null 2>&1 &
#运行进程
fi
sleep
30
PIDS
=
`
ps|grep kcloud |grep
-v
grep
|
awk
'{print $1}'
`
if
[
"
$PIDS
"
!=
""
]
;
then
echo
"kcloud is runing!"
else
/home/kk/kcloud
>
/dev/null 2>&1 &
#运行进程
fi
done
rc.local
0 → 100644
View file @
2d71ac7f
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
nanomsg_File="/home/kk/lib/libnanomsg.so.5"
ev_File="/home/kk/lib/libev.so.4"
cd /sbin/
insmod /sbin/ssd1306-revision.ko
/sbin/oled >/dev/null 2>&1 &
sleep 1
export LD_LIBRARY_PATH=/home/kk/lib
cd /home/kk/lib
if [ ! -f "$nanomsg_File" ]; then
ln libnanomsg.so libnanomsg.so.5
fi
if [ ! -f "$ev_File" ]; then
ln libev.so libev.so.4
fi
CCU_ID=`cat /etc/dropbear/accessory/hj/hj_ccuid`
/sbin/logread -f -r 120.55.149.201 514 -p /var/run/logread.cloud_log.pid -u -h $CCU_ID >/dev/null 2>&1 &
/sbin/logread -f -e "ccu_err_info" -F /etc/dropbear/accessory/hj/err.log -p /var/run/logread.err_log.pid -S 512 >/dev/null 2>&1 &
sleep 1
/home/kk/run.sh >/dev/null 2>&1 &
sleep 10
/home/kk/process_check.sh >/dev/null 2>&1 &
cd /sbin
/sbin/logd-check.sh >/dev/null 2>&1 &
sleep 1
ntpd -n -q -d -p stdtime.gov.hk &
exit 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