Changes between Version 1 and Version 2 of UserGuide/InitScript/OpenSUSE
- Timestamp:
- 10/23/2010 07:41:15 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuide/InitScript/OpenSUSE
v1 v2 1 1 = openSUSE Init Script = 2 2 3 == Deluge d==3 == Deluge daemon (deluged) == 4 4 5 5 {{{ 6 #!sh7 6 #! /bin/sh 8 7 # Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. … … 15 14 # 16 15 # /usr/sbin/deluged 16 # 17 # FROM http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/OpenSUSE 17 18 # 18 19 ### BEGIN INIT INFO … … 33 34 test -x $DELUGED_BIN || exit 5 34 35 35 DELUGED_USER="deluge" # CHANGE THIS36 DELUGED_USER="deluge" 36 37 test -n "$DELUGED_USER" || exit 6 37 38 38 DELUGED_PIDFILE=~/.config/deluge/deluged.pid 39 40 DELUGED_ARGS="-P DELUGED_PIDFILE" # consult man deluged for more options 39 DELUGED_PIDFILE=/home/$DELUGED_USER/.config/deluge/deluged.pid 40 41 DELUGED_ARGS="-c /home/$DELUGED_USER/.config/deluge/ -P $DELUGED_PIDFILE" # consult man deluged for more options 42 43 PYTHON_EGG_CACHE=/home/$DELUGED_USER/.python-eggs 41 44 42 45 . /etc/rc.status … … 57 60 start) 58 61 59 echo -n "Starting DELUGE daemon" 60 ## Start daemon with startproc(8). If this fails 61 ## the echo return value is set appropriate. 62 63 startproc -p $DELUGED_PIDFILE -u $DELUGED_USER $DELUGED_BIN $DELUGED_ARGS 64 65 # Remember status and be verbose 66 rc_status -v 67 ;; 62 echo -n "Starting DELUGE daemon" 63 ## Start daemon with startproc(8). If this fails 64 ## the echo return value is set appropriate. 65 66 export PYTHON_EGG_CACHE 67 startproc -l /var/log/deluged.log -p $DELUGED_PIDFILE -u $DELUGED_USER $DELUGED_BIN $DELUGED_ARGS 68 69 # Remember status and be verbose 70 rc_status -v 71 ;; 68 72 stop) 69 70 71 72 73 74 75 76 77 73 echo -n "Shutting down DELUGE daemon" 74 ## Stop daemon with killproc(8) and if this fails 75 ## set echo the echo return value. 76 77 killproc -TERM $DELUGED_BIN 78 79 # Remember status and be verbose 80 rc_status -v 81 ;; 78 82 try-restart) 79 83 ## Stop the service and if this succeeds (i.e. the … … 94 98 ;; 95 99 force-reload|reload) 96 97 98 99 100 101 100 ## Signal the daemon to reload its config. Most daemons 101 ## do this on signal 1 (SIGHUP). 102 103 echo -n "Reload service DELUGED" 104 105 killproc -HUP $DELUGED_BIN 102 106 103 107 rc_status -v … … 105 109 ;; 106 110 status) 107 111 echo -n "Checking for service DELUGED " 108 112 ## Check status with checkproc(8), if process is running 109 113 ## checkproc will return with exit status 0. … … 115 119 # 3 - service not running 116 120 117 118 119 120 121 checkproc $DELUGED_BIN 122 123 rc_status -v 124 ;; 121 125 probe) 122 123 124 125 126 ## Optional: Probe for the necessity of a reload, 127 ## give out the argument which is required for a reload. 128 129 ;; 126 130 *) 127 128 129 131 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 132 exit 1 133 ;; 130 134 esac 131 135 rc_exit 132 136 }}} 133 137 134 == Web UI ==138 == Web UI (deluge-web) == 135 139 136 140 {{{ 137 #!sh138 141 #! /bin/sh 139 142 # Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. … … 146 149 # 147 150 # /usr/sbin/deluge-webd 151 # 152 # FROM http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/OpenSUSE 148 153 # 149 154 ### BEGIN INIT INFO … … 151 156 # Required-Start: $local_fs $remote_fs 152 157 # Required-Stop: $local_fs $remote_fs 153 # Should-Start: $network 158 # Should-Start: $network deluged 154 159 # Should-Stop: $network 155 160 … … 165 170 166 171 DELUGED_WEB_USER="deluge" 172 173 DELUGED_WEB_ARGS="-c /home/$DELUGED_WEB_USER/.config/deluge/ -f" # consult man deluge-web for more options 174 175 PYTHON_EGG_CACHE=/home/$DELUGED_WEB_USER/.python-eggs 167 176 168 177 . /etc/rc.status … … 183 192 start) 184 193 185 echo -n "Starting DELUGE-WEB daemon" 186 ## Start daemon with startproc(8). If this fails 187 ## the echo return value is set appropriate. 188 189 startproc -f -u $DELUGED_WEB_USER $DELUGED_WEB_BIN 190 191 # Remember status and be verbose 192 rc_status -v 193 ;; 194 echo -n "Starting DELUGE-WEB daemon" 195 ## Start daemon with startproc(8). If this fails 196 ## the echo return value is set appropriate. 197 198 export PYTHON_EGG_CACHE 199 startproc -f -l /var/log/deluge-web.log -u $DELUGED_WEB_USER $DELUGED_WEB_BIN $DELUGED_WEB_ARGS 200 201 # Remember status and be verbose 202 rc_status -v 203 ;; 194 204 stop) 195 196 197 198 199 200 201 202 203 205 echo -n "Shutting down DELUGE-WEB daemon" 206 ## Stop daemon with killproc(8) and if this fails 207 ## set echo the echo return value. 208 209 killproc -TERM $DELUGED_WEB_BIN 210 211 # Remember status and be verbose 212 rc_status -v 213 ;; 204 214 try-restart) 205 215 ## Stop the service and if this succeeds (i.e. the … … 220 230 ;; 221 231 force-reload|reload) 222 223 224 225 226 227 232 ## Signal the daemon to reload its config. Most daemons 233 ## do this on signal 1 (SIGHUP). 234 235 echo -n "Reload service DELUGED_WEB" 236 237 killproc -HUP $DELUGED_WEB_BIN 228 238 229 239 rc_status -v … … 231 241 ;; 232 242 status) 233 243 echo -n "Checking for service DELUGED_WEB " 234 244 ## Check status with checkproc(8), if process is running 235 245 ## checkproc will return with exit status 0. … … 241 251 # 3 - service not running 242 252 243 244 245 246 253 checkproc $DELUGED_WEB_BIN 254 255 rc_status -v 256 ;; 247 257 probe) 248 249 250 251 258 ## Optional: Probe for the necessity of a reload, 259 ## give out the argument which is required for a reload. 260 261 ;; 252 262 *) 253 254 255 263 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 264 exit 1 265 ;; 256 266 esac 257 267 rc_exit