Changes between Version 14 and Version 15 of Scripts/initd
- Timestamp:
- Jan 10, 2009, 2:09:30 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Scripts/initd
v14 v15 31 31 ### END INIT INFO 32 32 33 # Original Author: Lennart A. JÃŒtte, based on Rob Howell's script 34 # Modified by Maarten Van Coile & others (on IRC) 35 33 36 # Do NOT "set -e" 34 37 … … 42 45 # For the available environement variables, visit: 43 46 # http://trac.transmissionbt.com/wiki/EnvironmentVariables 44 45 # The name of the user that should run Transmission 47 # 48 # The name of the user that should run Transmission. 49 # It's RECOMENDED to run Transmission in it's own user, 50 # by default, this is is set to 'transmission'. 51 # For the sake of security you shouldn't set a password 52 # on this user 46 53 USERNAME=transmission 47 54 … … 50 57 # Only change these options if you know what you are doing! 51 58 # 52 # The folder where Transmission stores the config & web files 59 # The folder where Transmission stores the config & web files. 53 60 # ONLY change this you have it at a non-default location 54 61 #TRANSMISSION_HOME="/var/config/transmission-daemon" 55 62 #TRANSMISSION_WEB_HOME="/usr/local/share/" 63 # 64 # The arguments passed on to transmission-daemon. 65 # ONLY change this you need to, otherwise use the 66 # settings file as per above. 67 #TRANSMISSION_ARGS="" 56 68 57 69 … … 85 97 do_start() 86 98 { 87 88 89 90 91 92 93 99 # Export the configuration/web directory, if set 100 if [ -n "$TRANSMISSION_HOME" ]; then 101 export TRANSMISSION_HOME 102 fi 103 if [ -n "$TRANSMISSION_WEB_HOME" ]; then 104 export TRANSMISSION_WEB_HOME 105 fi 94 106 95 # Return 96 # 0 if daemon has been started 97 # 1 if daemon was already running 98 # 2 if daemon could not be started 99 start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --exec $DAEMON \ 100 --test -- $TRANSMISSION_ARGS > /dev/null \ 101 || return 1 102 start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --exec $DAEMON \ 103 || return 2 107 # Return 108 # 0 if daemon has been started 109 # 1 if daemon was already running 110 # 2 if daemon could not be started 111 start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --exec $DAEMON \ 112 --test -- $TRANSMISSION_ARGS > /dev/null \ 113 || return 1 114 start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --exec $DAEMON \ 115 -- $TRANSMISSION_ARGS \ 116 || return 2 104 117 } 105 118