Can you please post your RunLast log?
[QPKG] RunLast
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
-
- Starting out
- Posts: 22
- Joined: Wed May 07, 2014 2:26 am
- Location: The Netherlands
Re: [QPKG] RunLast
Script 4 is the nzbget script. All the scripts are working when executed in Putty in the RunLast script directory. Logged in as admin.
RunLast (20201106)
[Sat Nov 14 19:54:03 CET 2020] begin "start" scripts ...
[Sat Nov 14 19:54:03 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/1-python2.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/2-python3.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/3-boot.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/4-nzbget.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] end "start" scripts
RunLast (20201106)
[Sat Nov 14 19:54:03 CET 2020] begin "start" scripts ...
[Sat Nov 14 19:54:03 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/1-python2.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/2-python3.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/3-boot.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/4-nzbget.sh'" ...
[Sat Nov 14 19:54:04 CET 2020] => exitcode: (1)
[Sat Nov 14 19:54:04 CET 2020] => stdout: ""
[Sat Nov 14 19:54:04 CET 2020] => stderr: ""
[Sat Nov 14 19:54:04 CET 2020] end "start" scripts
You do not have the required permissions to view the files attached to this post.
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: [QPKG] RunLast
This shows each script exited with an error, but no stderr was captured. I have a sneaking suspicion this is another example of QTS not creating a symlink at [/dev/fd] again. Recently saw the same thing in sherpa.
Are you able to edit the [runlast.sh] script? If so, please add this line before the Init() function:
Code: Select all
[[ ! -e /dev/fd ]] && ln -s /proc/self/fd /dev/fd # sometimes, '/dev/fd' isn't created by QTS. Don't know why.
-
- Starting out
- Posts: 22
- Joined: Wed May 07, 2014 2:26 am
- Location: The Netherlands
Re: [QPKG] RunLast
Thanks, I add the code to runlast.sh. It's now executing the scripts again.
This is the result:
───────────────────────────────────────────────────────
RunLast (20201106)
[Mon Nov 16 11:02:04 CET 2020] begin "start" scripts ...
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/1-python2.sh'" ...
[Mon Nov 16 11:02:05 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:05 CET 2020] => stdout: ""
[Mon Nov 16 11:02:05 CET 2020] => stderr: ""
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/2-python3.sh'" ...
[Mon Nov 16 11:02:05 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:05 CET 2020] => stdout: ""
[Mon Nov 16 11:02:05 CET 2020] => stderr: ""
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/3-boot.sh'" ...
[Mon Nov 16 11:02:06 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:06 CET 2020] => stdout: ""
[Mon Nov 16 11:02:06 CET 2020] => stderr: ""
[Mon Nov 16 11:02:06 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/4-nzbget.sh'" ...
[Mon Nov 16 11:02:07 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:07 CET 2020] => stdout: ""
[Mon Nov 16 11:02:07 CET 2020] => stderr: ""
[Mon Nov 16 11:02:07 CET 2020] end "start" scripts
This is the result:
───────────────────────────────────────────────────────
RunLast (20201106)
[Mon Nov 16 11:02:04 CET 2020] begin "start" scripts ...
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/1-python2.sh'" ...
[Mon Nov 16 11:02:05 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:05 CET 2020] => stdout: ""
[Mon Nov 16 11:02:05 CET 2020] => stderr: ""
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/2-python3.sh'" ...
[Mon Nov 16 11:02:05 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:05 CET 2020] => stdout: ""
[Mon Nov 16 11:02:05 CET 2020] => stderr: ""
[Mon Nov 16 11:02:05 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/3-boot.sh'" ...
[Mon Nov 16 11:02:06 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:06 CET 2020] => stdout: ""
[Mon Nov 16 11:02:06 CET 2020] => stderr: ""
[Mon Nov 16 11:02:06 CET 2020] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/4-nzbget.sh'" ...
[Mon Nov 16 11:02:07 CET 2020] => exitcode: (0)
[Mon Nov 16 11:02:07 CET 2020] => stdout: ""
[Mon Nov 16 11:02:07 CET 2020] => stderr: ""
[Mon Nov 16 11:02:07 CET 2020] end "start" scripts
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: [QPKG] RunLast
Great! I'll release a new build shortly. Thank you.
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
My Use Case:
I've made a copy of calibre-web in the .qpkg directory: "calibre-web-0.6.11"
I need to run nohup python cps.py at start-up to ensure the webgui remains open while the NAS is up.
I've installed RunLast and made a scripts called cali.sh (chmod'd 777), which contains the below:
#!/bin/sh
nohup python ../../calibre-web-0.6.11/cps.py
Am I going about this right or missing something?
I've made a copy of calibre-web in the .qpkg directory: "calibre-web-0.6.11"
I need to run nohup python cps.py at start-up to ensure the webgui remains open while the NAS is up.
I've installed RunLast and made a scripts called cali.sh (chmod'd 777), which contains the below:
#!/bin/sh
nohup python ../../calibre-web-0.6.11/cps.py
Am I going about this right or missing something?
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: [QPKG] RunLast
'nohup' isn't included in QTS. Did you install it via Entware? If so, please use the Entware init system to start your script.
Is there a ''--daemon" mode available for that application?
Additionally, that script shows you're specifying a relative path to [cps.py]. It's safer to specify an absolute path, as you can't be sure which directory will be current when your script is executed.
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
I did indeed have to install via Entware since Qnapware is so 90's.
I'm using the instructions here & trying to get it to work, installing things via Entware as required:
https://github.com/janeczku/calibre-web
I've got it to work by manually starting up but need it at start-up.
I'll read more about the Entware init system. I didn't know it was an option.
My next task will be trying to get LDAP working -- this is to replace LL for me.
I'm finding that too heavy for my needs.
Don't suppose you want to bash out a version of this on sherpa? -- *cheeky-ask*
I'm using the instructions here & trying to get it to work, installing things via Entware as required:
https://github.com/janeczku/calibre-web
I've got it to work by manually starting up but need it at start-up.
I'll read more about the Entware init system. I didn't know it was an option.
My next task will be trying to get LDAP working -- this is to replace LL for me.
I'm finding that too heavy for my needs.
Don't suppose you want to bash out a version of this on sherpa? -- *cheeky-ask*
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
https://github.com/janeczku/calibre-web ... e-on-Linux
This did show promise, but I read on the forums that it's dangerous to systemctl. // Unsure
This did show promise, but I read on the forums that it's dangerous to systemctl. // Unsure
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: [QPKG] RunLast
Yup, see here for instructions: viewtopic.php?p=787641#p787641
There's already a package for this on the Qnapclub Store (hopefully this page loads properly for you - it's looks a bit corrupt on my end... ): https://www.qnapclub.eu/index.php/en/qpkg/1113
QTS doesn't include SystemD, so it's not possible to use SystemD service files, and also means: no 'systemctl' binary is available.rs1001 wrote: ↑Sat May 01, 2021 8:45 pm https://github.com/janeczku/calibre-web ... e-on-Linux
This did show promise, but I read on the forums that it's dangerous to systemctl. // Unsure
QTS still uses the older SystemV-style init files to start and stop daemons. The basic structure is shown here: https://github.com/OneCDOnly/PackageTem ... package.sh
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
Okay, good to know that it's a non-starter. I'll stop trying to force-feed systemctl then.
If I've understood you right, shifting the script called SCali.sh to /opt/etc/init/d containing:
#!/bin/sh
nohup python /share/CACHEDEV1_DATA/.qpkg/calibre-web-0.6.11/cps.py
... should do the trick.
Restarting, fingers-crossed.
>> I did see that qpkg, but I'm being tight with how many things I install. This has an Apache80 dependency.
I'll be bothering you with LDAP woes soon enough.
Thanks for the help once again.
If I've understood you right, shifting the script called SCali.sh to /opt/etc/init/d containing:
#!/bin/sh
nohup python /share/CACHEDEV1_DATA/.qpkg/calibre-web-0.6.11/cps.py
... should do the trick.
Restarting, fingers-crossed.
>> I did see that qpkg, but I'm being tight with how many things I install. This has an Apache80 dependency.
I'll be bothering you with LDAP woes soon enough.
Thanks for the help once again.
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
Well, the startup for calibre worked wonders.
And it turns out that ODPS works in a way that I won't be needing LDAP. -- so that's a big victory.
Next up, I got adventurous and tried to upgrade Jackett to the source (not relying on Mono)
Also works.. Followed these instructions: https://github.com/Jackett/Jackett#inst ... nux-amdx64
and with my newfound knowledge shifted that to a script in the init.d folder too.
#!/bin/sh
nohup /share/CACHEDEV1_DATA/.qpkg/Jackett/.jackett &
This one won't start up though. In addition, when I manually start it up, settings prior like indexers & port change don't persist.
It's like a fresh install every time. Would this be better suited using RunLast?
And it turns out that ODPS works in a way that I won't be needing LDAP. -- so that's a big victory.
Next up, I got adventurous and tried to upgrade Jackett to the source (not relying on Mono)
Also works.. Followed these instructions: https://github.com/Jackett/Jackett#inst ... nux-amdx64
and with my newfound knowledge shifted that to a script in the init.d folder too.
#!/bin/sh
nohup /share/CACHEDEV1_DATA/.qpkg/Jackett/.jackett &
This one won't start up though. In addition, when I manually start it up, settings prior like indexers & port change don't persist.
It's like a fresh install every time. Would this be better suited using RunLast?
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
- OneCD
- Guru
- Posts: 12144
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: [QPKG] RunLast
Sounds like you may need to run it with some configuration parameters. Many daemons require a config file to be specified at the time you instance them. However, the method and file format will be application-specific, so you'll need to dig-into the Jackett documentation to see how this should be done.
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
In fiddling with this, I've managed to do something catastrophic.
I got an error that mnt was full and ram coked out. Fans off.
Restarted twice and ALL my qpkg's are gone on the QTS "App Centre" interface!
Thankfully all the media is there, but I still might cry for a bit.
There's poem semblance of hope I haven't lost all my settings as the files still exist in .qpkg
I got an error that mnt was full and ram coked out. Fans off.
Restarted twice and ALL my qpkg's are gone on the QTS "App Centre" interface!
Thankfully all the media is there, but I still might cry for a bit.
There's poem semblance of hope I haven't lost all my settings as the files still exist in .qpkg
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
-
- Getting the hang of things
- Posts: 72
- Joined: Thu Jun 18, 2015 11:44 am
Re: [QPKG] RunLast
[/share/CACHEDEV1_DATA/.qpkg/COPS] # Usage: ./COPS.sh {start|stop|restart}
./COPS.sh start
COPS is disabled.
lol. Ain't that the truth.
./COPS.sh start
COPS is disabled.
lol. Ain't that the truth.
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277