add 5-6_基于JSON-RPC改造QT程序

This commit is contained in:
weidongshan
2024-09-10 21:11:41 +08:00
parent 3df82eca5d
commit 8325ba161a
5 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/sh
start() {
echo -e "\033[9;0]" > /dev/tty0
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_FONTDIR=/usr/lib/fonts/
psplash-write "PROGRESS 95"
psplash-write "QUIT"
/root/rpc_server &
sleep 5
/root/LED_and_TempHumi &
}
stop() {
killall LED_and_TempHumi
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: $0 {start| stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,32 @@
#!/bin/sh
insmod /root/led_drv.ko
insmod /root/dht11_drv.ko
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
psplash -n &
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
/bin/hostname -F /etc/hostname