FS#28847 - [deluge] Recent revamp scripts is very strangely
Attached to Project:
Arch Linux
Opened by Andrew (gman) - Saturday, 10 March 2012, 08:21 GMT
Last edited by Jan Alexander Steffens (heftig) - Monday, 27 August 2012, 09:46 GMT
Opened by Andrew (gman) - Saturday, 10 March 2012, 08:21 GMT
Last edited by Jan Alexander Steffens (heftig) - Monday, 27 August 2012, 09:46 GMT
|
Details
Description:
Recent revamp scripts is very strangely. kill executed two times on head /etc/rc.d/deluged and in case stop. It provided unwanted message from kill. And why deleted DELUGE_USER? Additional info: * package version(s) 1.3.4-1 Sorry for my poor English. Best regards, Andrey |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Monday, 27 August 2012, 09:46 GMT
Reason for closing: None
Additional comments about closing: invalid
Monday, 27 August 2012, 09:46 GMT
Reason for closing: None
Additional comments about closing: invalid
Is it a bug or is it by design?
Will deluged then run as my user?
I temporarily replaced "deluge" with $DELUGE_USER in following string
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged $OPTIONS >/dev/null" deluge
and add DELUGE_USER to /etc/conf.d/deluged as in older version.
But /etc/rc.d/deluged will replaced with update. I want maintainer to clarify this issue.
OPTIONS=""
WEB_OPTIONS=""
DELUGE_USER="user"
In /etc/rc.d/deluged
http://pastebin.com/WFe2w48k
Hmm, you had changed from DELUGED_USER to DELUGE_USER
Changed to DELUGE_USER in /etc/conf.d/deluged but still is does not work
I get:
IOError: [Errno 13] Permission denied: '/run/deluge/deluged.pid'
when starting deluged
But I still cant start deluged. I get:
sudo /etc/rc.d/deluged start
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
:: Starting Deluge Daemon [DONE]
[niclas@nas ~]$ Traceback (most recent call last):
File "/usr/bin/deluged", line 9, in <module>
load_entry_point('deluge==1.3.4', 'console_scripts', 'deluged')()
File "/usr/lib/python2.7/site-packages/deluge/main.py", line 202, in start_daemon
write_pidfile()
File "/usr/lib/python2.7/site-packages/deluge/main.py", line 189, in write_pidfile
open(options.pidfile, "wb").write("%s\n" % os.getpid())
IOError: [Errno 13] Permission denied: '/run/deluge/deluged.pid'
deluge-web starts fine but deluged does not
Why does it have to be so damn hard??
# /etc/rc.d/deluged restart
Deluged restarts just fine but deluge-web refuses to start
sudo /etc/rc.d/deluge-web start
Password:
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
:: Starting Deluge WebUI [DONE]
Soo it looks like it starts but it doesnt
patch
--- /etc/rc.d/deluge-web.orig 2012-03-11 09:02:32.000000000 +0400
+++ /etc/rc.d/deluge-web 2012-03-11 17:16:41.578350158 +0400
@@ -13,12 +13,12 @@
case "$1" in
start)
stat_busy "Starting Deluge WebUI"
- [[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluge-web $WEB_OPTIONS >/dev/null" deluge
+ [[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluge-web $WEB_OPTIONS >/dev/null" $DELUGE_USER
if [ $? -gt 0 ]; then
stat_fail
else
sleep 1
- echo $(pgrep -u deluge deluge-web) > $PIDFILE
+ echo $(pgrep -u $DELUGE_USER deluge-web) > $PIDFILE
add_daemon deluge-web
stat_done
fi
After that I did all the changes to deluge, deluge-web and /etc/conf.d/deluged
Now I can start deluge but I still cant start deluge.web
I get this:
sudo /etc/rc.d/deluge-web start
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
:: Starting Deluge WebUI [BUSY] [ERROR ] 14:27:53 client:395 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: daemon.login(localclient, 97269d9ed01694a9502105186cc027cf89ce8414)
--------------------------------------------------------------------------------
File "/usr/lib/python2.7/site-packages/deluge/core/rpcserver.py", line 259, in dispatch
ret = component.get("AuthManager").authorize(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/deluge/core/authmanager.py", line 93, in authorize
raise BadLoginError("Password does not match")
BadLoginError: Password does not match
--------------------------------------------------------------------------------
[DONE]
But deluged wont start from cli. But it starts just fine from the web-gui
And once I got deluged running I cant stop it with "sudo /etc/rc.d/deluged stop"
This is what happens:
udo /etc/rc.d/deluged stop
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
:: Stopping Deluge Daemon [FAIL]
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/deluged
PIDFILE=/run/deluge/deluged.pid
OPTIONS="-P $PIDFILE $OPTIONS"
[[ -f $PIDFILE ]] && PID=$(<$PIDFILE)
kill -0 $PID || PID=
case "$1" in
start)
stat_busy "Starting Deluge Daemon"
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged $OPTIONS >/dev/null" $DELUGE_USER
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon deluged
stat_done
fi
;;
stop)
stat_busy "Stopping Deluge Daemon"
[[ ! -z $PID ]] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon deluged
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Whats the big change that has been done from v1.3.3 to v1.3.4
I never had any of these problem with v1.3.3
So I upgraded to 1.3.4 but used the same scripts(deluged and deluge-web) as in 1.3.3
And now it works :-):-):-):-):-):-):-):-)
This bit is not in the 1.3.4 deluged script:
echo $(pgrep -u $DELUGE_USER deluged) > /var/run/deluged.pid
Is is a bug that its missing?
1) Replace in /etc/rc.d/deluged the line that says
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged $OPTIONS >/dev/null" deluge
with this line:
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged $OPTIONS >/dev/null" $DELUGE_USER
and set that parameter in /etc/conf.d/deluge just as in deluge's previous version.
2) chown -R DELUGEUSERNAME /var/run/deluge
DELUGEUSERNAME being the value in $DELUGE_USER
This should have been put as a notification maybe in the upgrade.
chown -R myuser /var/run/deluge &
rc.d restart deluged
It works now on every reboot.
2. ls -ld /var/run
lrwxrwxrwx 1 root root /var/run -> /run
lrwxrwxrwx 1 root root 4 Dec 19 21:44 /var/run -> /run
That's what I have
ls: cannot access /var/run/deluge: No such file or directory
my /usr/lib/tmpfiles.d/deluge.conf
d /run/deluge 0755 owner group -
chown -R (myusername) /var/run/deluge
change /etc/rc.d/deluged & /etc/rc.d/deluge-web to use DELUGE_USER option found in /etc/conf.d/deluge instead of user deluge:
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged $OPTIONS >/dev/null" $DELUGE_USER
[[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluge-web $WEB_OPTIONS >/dev/null" $DELUGE_USER
Add this to /etc/rc.local:
chown -R (myusername) /var/run/deluge &
rc.d restart deluged
Ended up switching to Transmission till deluge gets stable again (user since pre 1.0!).
Why????
This is crazy with all the problems every time there is an upgrade. Dont you guys test it at all??
Why hasn't this been fixed?
My deluge is ignoring speedlimit that I have set. If I set a speedlimit it always downloads at full speed :-(
It stopped working a couple of days ago. Didnt happen with a deluge upgrade, but some other package broke this function.
Anyone else having this problem?
E.g.: Edit the bug's summary!