SOURCES: mpdscribble.conf (NEW), mpdscribble.init (NEW), mpdscribb...
czarny
czarny at pld-linux.org
Sun Jun 3 11:02:28 CEST 2007
Author: czarny Date: Sun Jun 3 09:02:28 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- default daemon config files
---- Files affected:
SOURCES:
mpdscribble.conf (NONE -> 1.1) (NEW), mpdscribble.init (NONE -> 1.1) (NEW), mpdscribble.sysconfig (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mpdscribble.conf
diff -u /dev/null SOURCES/mpdscribble.conf:1.1
--- /dev/null Sun Jun 3 11:02:28 2007
+++ SOURCES/mpdscribble.conf Sun Jun 3 11:02:23 2007
@@ -0,0 +1,4 @@
+# Update this for Your account.
+# More in man mpdscribble
+# username = foo
+# password = bar
================================================================
Index: SOURCES/mpdscribble.init
diff -u /dev/null SOURCES/mpdscribble.init:1.1
--- /dev/null Sun Jun 3 11:02:28 2007
+++ SOURCES/mpdscribble.init Sun Jun 3 11:02:23 2007
@@ -0,0 +1,95 @@
+#!/bin/sh
+#
+# mpdscribble Scrobbling for mpd
+#
+# chkconfig: 345 99 1
+#
+# description: Mpdscribble subbmits song being played with mpd to
+# Audioscrobbler.
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/mpdscribble ] && . /etc/sysconfig/mpdscribble
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down mpdscribble
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+start() {
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/mpdscribble ]; then
+ msg_starting mpdscribble
+ daemon mpdscribble
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mpdscribble
+ else
+ msg_already_running mpdscribble
+ fi
+}
+
+stop() {
+ if [ -f /var/lock/subsys/mpdscribble ]; then
+ # Stop daemons.
+ msg_stopping mpdscribble
+ killproc mpdscribble
+ rm -f /var/lock/subsys/mpdscribble
+ else
+ msg_not_running mpdscribble
+ fi
+}
+
+reload() {
+ if [ -f /var/lock/subsys/mpdscribble ]; then
+ msg_reloading mpdscribble
+ killproc mpdscribble -HUP
+ RETVAL=$?
+ else
+ msg_not_running mpdscribble
+ RETVAL=7
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ reload)
+ reload
+ ;;
+# ONLY if program allows reloading without stopping
+# otherwise include force-reload with 'reload'
+ force-reload)
+ reload
+ ;;
+ status)
+ status mpdscribble
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
================================================================
Index: SOURCES/mpdscribble.sysconfig
diff -u /dev/null SOURCES/mpdscribble.sysconfig:1.1
--- /dev/null Sun Jun 3 11:02:28 2007
+++ SOURCES/mpdscribble.sysconfig Sun Jun 3 11:02:23 2007
@@ -0,0 +1,4 @@
+# Customized settings for mpdscribble
+
+# Define nice level for mpdscribble
+SERVICE_RUN_NICE_LEVEL="+0"
================================================================
More information about the pld-cvs-commit
mailing list