Standardize makefile and init script

git-svn-id: svn://svn.openwrt.org/openwrt/packages@7203 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2007-05-13 12:47:49 +00:00
parent 11f2e6e82c
commit ff01f4cd22
2 changed files with 19 additions and 6 deletions

View File

@ -1,3 +1,11 @@
#
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: $
include $(TOPDIR)/rules.mk
PKG_NAME:=gkrellmd
@ -37,11 +45,9 @@ endef
define Package/gkrellmd/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
$(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/gkrellmd.init $(1)/etc/init.d/gkrellmd
endef

View File

@ -1,9 +1,16 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=60
BIN=gkrellmd
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
/usr/bin/gkrellmd
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
killall gkrellmd
[ -f $PID_F ] && kill $(cat $PID_F)
}