Nzbget MainDir map won't work on new hard drive
|
Posts: 215
Threads: 25
Joined: Aug 2015
Reputation:
26
[Solved]
Feb 27, 2016, 06:55 PM
(This post was last modified: Feb 27, 2016, 08:01 PM by Yveske.)
Yesterday I bought a new hard drive which is supposed to be for all my series but was also supposed to be use for the downloading.
Now Nzbget has always been working fine downloading to my old hard drive but won't work on my new drive and this has to do with the MainDir.
If I set all paths to my new hard drive nzbget seems to not start running, well when I check the status it says active (exiting). If I delete the MainDir map and restart nzbget then it starts up.
If I do change the MainDir to my old hard drive there is no problem at all.
I also tried with nzbget on a fresh install but no luck.
It would be nice if I could have everything to work on my series hard drive so if it's downloading it doesn't have start 2 hard drives every time.
Edit: I also tried adding a cronjob but no luck.
That McNugget sauce. I want that Mulan McNugget sauce, Morty. That's my series arc, Morty! If it takes nine seasons!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 27, 2016, 09:58 PM
Thank you for sharing this, others have had this issue and I thought it was a jessie and systemd being funny. Now we have data that it is the hard drive.
This should fix it, open your nzbget systemd service file and add this under [Unit]
Code:
RequiresMountsFor=/mnt/usbstorage
Posts: 215
Threads: 25
Joined: Aug 2015
Reputation:
26
[Solved]
Feb 27, 2016, 10:31 PM
It won't stay if I add it to the file.
I open the service file:
Code:
nano /run/systemd/generator.late/nzbget.service
I add the code under [Unit], save and close it.
But if I reboot or run
Code:
systemctl daemon-reload
And I open the file again the added code is disappeared.
That McNugget sauce. I want that Mulan McNugget sauce, Morty. That's my series arc, Morty! If it takes nine seasons!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 27, 2016, 10:45 PM
The location of the file to edit is in /etc/systemd/system/nzbget.service
Systemd puts these .service files in multiple locations after enabling them, looks like you were editing the currently active cached one or something
Posts: 215
Threads: 25
Joined: Aug 2015
Reputation:
26
[Solved]
Feb 27, 2016, 11:07 PM
That's what I was thinking first but this doesn't seem to exist. This generator.late one seems the only one I can find.
These are the results I get when I run find / -name 'nzbget.service':
Code:
/run/systemd/generator.late/nzbget.service
/run/systemd/generator.late/runlevel5.target.wants/nzbget.service
/run/systemd/generator.late/runlevel4.target.wants/nzbget.service
/run/systemd/generator.late/runlevel3.target.wants/nzbget.service
/run/systemd/generator.late/runlevel2.target.wants/nzbget.service
/sys/fs/cgroup/systemd/system.slice/nzbget.service
That McNugget sauce. I want that Mulan McNugget sauce, Morty. That's my series arc, Morty! If it takes nine seasons!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 27, 2016, 11:13 PM
I should have asked this first, looks like you have an init.d script instead. Try adding this inside the start() block of the /etc/init.d/nzbget file, replace /mnt/usbstorage with your mount point
Code:
count=0
while ! test -f /mnt/usbstorage -a $count -lt 30
do
sleep 1
count=`expr $count + 1`
done
if test $count -eq 30
then
echo "timed out!"
exit 1
fi
http://serverfault.com/questions/550382/...t-d-script
Posts: 215
Threads: 25
Joined: Aug 2015
Reputation:
26
[Solved]
Feb 27, 2016, 11:46 PM
This is how the start part looks now but sadly enough it doesn't solve the problem.
Code:
do_start() {
local result
pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null
if [ $? -eq 0 ]; then
log_warning_msg "${DAEMON_NAME} is already started"
result=0
else
log_daemon_msg "Starting ${DAEMON_DESC}" "${DAEMON_NAME}"
touch "${DAEMON_LOG}"
chown $DAEMON_USER "${DAEMON_LOG}"
chmod u+rw "${DAEMON_LOG}"
if [ -z "${DAEMON_USER}" ]; then
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
else
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--chuid "${DAEMON_USER}" \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
fi
log_end_msg $result
fi
return $result
count=0
while ! test -f /mnt/usbstorage2tb -a $count -lt 30
do
sleep 1
count=`expr $count + 1`
done
if test $count -eq 30
then
echo "timed out!"
exit 1
fi
}
I also tried changing test -f to mountpoint -q and changed the mount point to the MainDir map but none of it worked.
That McNugget sauce. I want that Mulan McNugget sauce, Morty. That's my series arc, Morty! If it takes nine seasons!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 27, 2016, 11:48 PM
Put it in the beginning, by the time you have told it to wait for the hard drive it has already tried to start the service
Code:
do_start() {
count=0
while ! test -f /mnt/usbstorage2tb -a $count -lt 30
do
sleep 1
count=`expr $count + 1`
done
if test $count -eq 30
then
echo "timed out!"
exit 1
fi
local result
pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null
if [ $? -eq 0 ]; then
log_warning_msg "${DAEMON_NAME} is already started"
result=0
else
log_daemon_msg "Starting ${DAEMON_DESC}" "${DAEMON_NAME}"
touch "${DAEMON_LOG}"
chown $DAEMON_USER "${DAEMON_LOG}"
chmod u+rw "${DAEMON_LOG}"
if [ -z "${DAEMON_USER}" ]; then
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
else
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--chuid "${DAEMON_USER}" \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
fi
log_end_msg $result
fi
return $result
}
Posts: 215
Threads: 25
Joined: Aug 2015
Reputation:
26
[Solved]
Feb 28, 2016, 12:03 AM
No luck. I even tried to set the number of attempts higher but nothing.
That McNugget sauce. I want that Mulan McNugget sauce, Morty. That's my series arc, Morty! If it takes nine seasons!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 28, 2016, 02:32 PM
OK, remove that snippet and try this instead, we are going to make nzbget start later
Code:
sudo update-rc.d nzbget disable
sudo update-rc.d nzbget defaults 98
|
|
Recent Posts
|
About Swap
jonescelinaa Apr 10, 2024, 06:58 AM
|
Tracker Status: Error Connection Time Out
jonesPhedra Apr 04, 2024, 08:17 AM
|
Split Tunnel Docker Containers
jonesPhedra Mar 27, 2024, 03:10 AM
|
Plex server not powerful enough, but only with s...
jonesPhedra Mar 27, 2024, 03:02 AM
|
game Geometry Dash Scratch
jonescelinaa Jan 31, 2024, 04:21 AM
|
Latest unread posts | Unanswered posts |
|