mirror of https://github.com/OpenIPC/firmware.git
[no ci] rubyfpv: adjust init.d script (#1342)
parent
29e6d8a3d0
commit
4410246b4e
general/package/rubyfpv
|
@ -1,31 +1,26 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
hw=$(ipcinfo -c)
|
||||||
# Start ruby
|
|
||||||
#
|
|
||||||
|
|
||||||
chip=$(ipcinfo -c)
|
|
||||||
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
|
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
|
||||||
echo "Chip: " > /tmp/ruby_boot.log
|
|
||||||
echo ${chip} >> /tmp/ruby_boot.log
|
echo "Chipset = ${hw}" | logger -s -t RubyFPV
|
||||||
echo "Firmware: " >> /tmp/ruby_boot.log
|
echo "Firmware = ${fw}" | logger -s -t RubyFPV
|
||||||
echo ${fw} >> /tmp/ruby_boot.log
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if ! [ -f /etc/system.ok ]; then
|
if ! [ -f /etc/system.ok ]; then
|
||||||
tweaksys ${chip}
|
tweaksys ${hw}
|
||||||
fi
|
fi
|
||||||
|
echo "Starting Ruby..." | logger -s -t RubyFPV
|
||||||
|
ruby_start
|
||||||
|
;;
|
||||||
|
|
||||||
echo "Starting Ruby..."
|
stop)
|
||||||
echo "Starting Ruby..." >> /tmp/ruby_boot.log
|
echo "Stopping Ruby..." | logger -s -t RubyFPV
|
||||||
/usr/sbin/ruby_start
|
ruby_stop
|
||||||
;;
|
;;
|
||||||
stop)
|
|
||||||
echo "Stopping Ruby..."
|
*)
|
||||||
echo "Stopping Ruby..." >> /tmp/ruby_boot.log
|
echo "Usage: $0 {start|stop}"
|
||||||
/usr/sbin/ruby_stop.sh
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop}"
|
|
||||||
exit 1
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
killall -q ruby_start
|
killall -q ruby_start
|
||||||
killall -q ruby_rx_commands
|
killall -q ruby_rx_commands
|
||||||
killall -q ruby_tx_telemetry
|
killall -q ruby_tx_telemetry
|
|
@ -23,7 +23,7 @@ define RUBYFPV_INSTALL_TARGET_CMDS
|
||||||
|
|
||||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/sbin
|
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/sbin
|
||||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/sbin $(@D)/output/*
|
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/sbin $(@D)/output/*
|
||||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/sbin $(RUBYFPV_PKGDIR)/files/ruby_stop.sh
|
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/sbin $(RUBYFPV_PKGDIR)/files/ruby_stop
|
||||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/sbin $(RUBYFPV_PKGDIR)/files/version_ruby_base.txt
|
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/sbin $(RUBYFPV_PKGDIR)/files/version_ruby_base.txt
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue