[openwrt] add init.d script to flukso package
This commit is contained in:
parent
9e8b7680b6
commit
cbc7949d95
|
@ -33,6 +33,8 @@ endef
|
||||||
define Package/flukso/install
|
define Package/flukso/install
|
||||||
$(INSTALL_DIR) $(1)/etc/config
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/flukso.uci $(1)/etc/config/flukso
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/flukso.uci $(1)/etc/config/flukso
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/flukso.init $(1)/etc/init.d/flukso
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/lua
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dbg.lua $(1)/usr/lib/lua/
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dbg.lua $(1)/usr/lib/lua/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/lua/rrd
|
$(INSTALL_DIR) $(1)/usr/lib/lua/rrd
|
||||||
|
@ -43,8 +45,11 @@ define Package/flukso/install
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/luad $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/luad $(1)/usr/sbin/
|
||||||
$(LN) /usr/sbin/luad $(1)/usr/sbin/fluksod
|
$(LN) /usr/sbin/luad $(1)/usr/sbin/fluksod
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fluksod.lua $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fluksod.lua $(1)/usr/sbin/
|
||||||
|
$(LN) /usr/sbin/luad $(1)/usr/sbin/spid
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/spid.lua $(1)/usr/sbin/
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fsync.lua $(1)/usr/bin/fsync
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fsync.lua $(1)/usr/bin/fsync
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/restful.lua $(1)/usr/bin/restful
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,flukso))
|
$(eval $(call BuildPackage,flukso))
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (c) 2011 Bart Van Der Meerssche
|
||||||
|
|
||||||
|
START=98
|
||||||
|
|
||||||
|
start() {
|
||||||
|
chmod 666 /dev/spidev0.0
|
||||||
|
|
||||||
|
/usr/sbin/spid
|
||||||
|
/usr/sbin/fluksod
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
/usr/sbin/fluksod -k
|
||||||
|
/usr/sbin/spid -k
|
||||||
|
|
||||||
|
rm -rf /var/run/spid
|
||||||
|
rm -rf /var/run/fluksod
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue