mirror of
http://git.openwrt.org/packages.git
synced 2025-01-09 04:19:54 +08:00
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:
parent
11f2e6e82c
commit
ff01f4cd22
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user