changeset 5:b88065b70ecd draft

fix rc.d script Signed-off-by: Changaco <changaco ατ changaco δοτ net>
author Changaco <changaco ατ changaco δοτ net>
date Mon, 16 Apr 2012 00:30:37 +0200
parents 70bf588021fa
children 455cd8c78862
files rc.d/feed-push
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rc.d/feed-push
+++ b/rc.d/feed-push
@@ -3,11 +3,6 @@
 . /etc/rc.conf
 . /etc/rc.d/functions
 
-get_pid() {
-    pgrep -f $daemon_name | grep -v $$
-}
-PID=$(get_pid)
-
 daemon_bin="/usr/bin/feed-push"
 daemon_name=$(basename $daemon_bin)
 pid_file="/var/run/$daemon_name.pid"
@@ -15,6 +10,11 @@ pid_file="/var/run/$daemon_name.pid"
 data_dir=/var/lib/$daemon_name
 conf_dir=/etc/$daemon_name
 
+get_pid() {
+    pgrep -f $daemon_name | grep -v $$
+}
+PID=$(get_pid)
+
 case "$1" in
     start)
         stat_busy "Starting $daemon_name daemon"