#!/bin/bash
#
# /etc/rc.d/init.d/transmission-daemon
#
# Author: Miroslav Pilat
# chkconfig: 2345 13 87
# Description: Bittorrent client Transmission started as daemon
#
# Source function library.
. /etc/init.d/functions
#
# ----- CONFIGURATION -----
#
# For the default location Transmission uses, visit:
# http://trac.transmissionbt.com/wiki/ConfigFiles
# For a guide on how set the preferences, visit:
# http://trac.transmissionbt.com/wiki/EditConfigFiles
# For the available environement variables, visit:
# http://trac.transmissionbt.com/wiki/EnvironmentVariables
#
# The name of the user that should run Transmission.
# It's RECOMENDED to run Transmission in it's own user,
# by default, this is set to 'transmission'.
# For the sake of security you shouldn't set a password
# on this user
USERNAME=transmission
# ----- *ADVANCED* CONFIGURATION -----
# Only change these options if you know what you are doing!
#
# The folder where Transmission stores the config & web files.
# ONLY change this you have it at a non-default location
#TRANSMISSION_HOME="/etc/transmission-daemon"
#TRANSMISSION_WEB_HOME="/usr/share/transmission/web"
#
# The arguments passed on to transmission-daemon.
# ONLY change this you need to, otherwise use the
# settings file as per above.
#TRANSMISSION_ARGS=""
# ----- END OF CONFIGURATION -----
#
# PATH should only include /usr/* if it runs after the mountnfs.sh script.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DESC="bittorrent client"
NAME=transmission-daemon
DAEMON=$(which $NAME)
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
if [ -f /etc/$NAME/$NAME.conf ]; then
. /etc/$NAME/$NAME.conf
fi
start() {
echo -n "Starting $NAME: "
if [ -n "$TRANSMISSION_HOME" ]; then
export TRANSMISSION_HOME
fi
if [ -n "$TRANSMISSION_WEB_HOME" ]; then
export TRANSMISSION_WEB_HOME
fi
if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
echo $NAME already running: $PID
exit 2;
else
daemon $DAEMON $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/${NAME}
return $RETVAL
fi
touch /var/lock/subsys/${NAME}
return
}
stop() {
echo -n "Shutting down $NAME: "
killproc $NAME
rm -f /var/lock/subsys/${NAME}
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $NAME
;;
restart)
stop
start
;;
*)
echo "Usage: {start|stop|status}"
exit 1
;;
esac
exit $?
Monday, July 13, 2009
Transmission-deamon Fedora init script
I've recently setup a my old PC as bittorent download station. I use Fedora 11 and I needed transmission-daemon statup script. After some diggig o internet I found only debian like scripts so I decided to write it my self. Here is the result. Use is freely and wisely.
Monday, March 9, 2009
Definitely, Maybe
Seeing this movie and think about Othelo brought me to a thought about "Why we want to see happy ending stories?". I guess it's our life. We think we are having tough times. But that's not true. I believe most of us is having good times. Maybe our expectations are not full-filled but still we are living in times of sufficiency. We have wifes and husbands we love. Adorable, funny, amazing kids. Great parent, family. Social country :D and much more.
And that's why we need to read/watch tragedies. So we can realize how good life we are living. And we should take advice from these unhappy endigs and value what we have.
And that's why we need to read/watch tragedies. So we can realize how good life we are living. And we should take advice from these unhappy endigs and value what we have.
Subscribe to:
Posts (Atom)