From 7ee13a3edb0e4ddb238a8d33d0cbac9a0db4ca3d Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 13 May 2007 12:47:49 +0000 Subject: [PATCH] Standardize makefile and init script SVN-Revision: 7203 --- admin/gkrellmd/Makefile | 14 ++++++++++---- admin/gkrellmd/files/gkrellmd.init | 11 +++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/admin/gkrellmd/Makefile b/admin/gkrellmd/Makefile index 41462b1ab..1153b2743 100644 --- a/admin/gkrellmd/Makefile +++ b/admin/gkrellmd/Makefile @@ -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 diff --git a/admin/gkrellmd/files/gkrellmd.init b/admin/gkrellmd/files/gkrellmd.init index 8311d1d37..5bd88a945 100644 --- a/admin/gkrellmd/files/gkrellmd.init +++ b/admin/gkrellmd/files/gkrellmd.init @@ -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) } -- 2.30.2