2018年3月7日 星期三
2018年3月6日 星期二
OpenWRT cp210x driver
# opkg update
# opkg install kmod-usb-uhci
# opkg install kmod-usb-ohci
# opkg install kmod-usb2
# opkg install kmod-usb-serial-cp210x
References :
OpenWrt/LEDEでUSBシリアル変換アダプタを使う - Qiita
2017年1月2日 星期一
Supervisord on OpenWrt
# pip install supervisor
sample configuration file
# cp /usr/lib/python2.7/site-packages/supervisor/skel/sample.conf /etc/supervisord.conf
# vi /etc/init.d/supervisor
#!/bin/sh /etc/rc.common# chmod u+x /etc/init.d/supervisor
#
# AUTHOR: Takumi Sueda
#
# Start/stop/restart supervisor in OpenWrt. START=91 USE_PROCD=0
PROG=/usr/bin/supervisord DAEMON=${PROG} # Location of the pid file
PIDFILE=/tmp/supervisord.pid # Config of supervisor
CONFIG=/etc/supervisord.conf start_service()
{
# $DAEMON -c $CONFIG -j $PIDFILE
procd_open_instance
procd_set_param command $PROG -c $CONFIG -j $PIDFILE
procd_set_param respawn
procd_close_instance
touch $CONFIG
} stop_service()
{
kill $(cat $PIDFILE)
}
# /etc/init.d/supervisor start
開機自動啓動
# cd /etc/rc.d
# ln -s ../init.d/supervisor S99supervisor
開機自動啓動
# cd /etc/rc.d
# ln -s ../init.d/supervisor S99supervisor
訂閱:
文章 (Atom)