So, standing on the shoulders of giants on this forum (and others) I made some changes to my WD configuration via SSH login as root, but sadly, they have had no effect; anybody know what I’m doing wrong?
Firstly, a few days ago I modified the /etc/contentdir file from the original ‘+A|Public’ to ‘+M|Public/MUSIC’ (which is where my music lies in sub-directories organised by type FLAC, AIF etc.) which I believe is “used by Twonky to set the default server folder/share upon reboot (firmware upgrade)”. However this file has ended up being overwritten with the original values…
Now, last night I did 2 reboots because I made progressive edits to ‘the’ crontab file (see below), and after the first reboot, I’m certain it had worked when I checked the Twonky GUI, but after the second reboot it has definitely overwritten the file and Twonky has reverted to Public and all file types. The only thing I can think of is that I made a backup file called ‘contentdir.bak’ (see below list) and it’s read that instead – but OS’s don’t work like that do they?
drwxr-xr-x 2 root root 4096 Sep 27 2013 calendar
-rw-rw-r-- 1 root root 10 Apr 7 20:01 contentdir
-rw-rw-r-- 1 root root 10 Apr 3 19:40 contentdir.bak
drwxr-xr-x 2 root root 4096 Jan 12 00:21 cracklib
Secondly, I only share music files so I had successfully stopped the Photo indexing processes like this:
/bin/sh /etc/rc2.d/S86wdphotodbmergerd stop
/bin/sh /etc/rc2.d/S85wdmcserverd stop
and wanted to stop them returning after a reboot/upgrade via crontab entries, as below :
root 9747 9666 0 20:08 pts/0 00:00:00 ps -ef
WDMyCloud:~# crontab -l
For more information see the manual pages of crontab(5) and cron(8)
However after 1 reboot and a ‘ps –ef’, I could still see:
usr/local/wdmcserver/bin/wdmcserver –x off
usr/local/wdmcserver/bin/wdphotodbmerger
But I note there is no ‘d’ at the end of the name…
So I thought I’d add ‘@reboot /bin/sh /etc/rc2.d/S50netatalk stop’ to the crontab to stop the Apple service and reboot again (via the WD GUI), but I can still see the netatalk (as below) and indexing services.
The crontab file was empty when I started - is there more than 1/do I need to login differently?
So I achieved nothing – can anyone spot where I’ve misunderstood the processes or is this not possible anymore? (I installed the latest upgrade about 2 weeks ago)
Sorry this is such a long post but you now have all the facts I hope!
Did you have Twonky running when you made this change? I can’t remember whether I changed the settings in Twonky first, and then changed the /etc/contentdir to reflect these changes. I’ve never had the contentdir file overwritten, except by firmware upgrade. It’s possible that stopping Twonky causing the contentdir file to be overwritten with the values from the Twonky UI.
What firmware are you running?
I don’t use cron to sort out the reboot mess with indexing, etc; I use the /CacheVolume/user-start file, because it’s the last thing called during the startup process.
Here’s my user-start file. It stops the indexing and thumbnailing tasks, stops Twonky, copies the Twonky settings files from a ‘safe’ store in share space, and then restarts Twonky. This seems to be working well.
#!/bin/sh
# User startup script
# should run automatically after every reboot, and be unaltered by firmware upgrades
# so should sort out the mess caused by firmware upgrades
# stop and disable indexing services
/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotomergerd stop
update-rc.d wdmcserverd disable
update-rc.d wdphotomergerd disable
# sort out Twonky settings
# stop Twonky server
/etc/init.d/twonky stop
# copy saved content directory settings
cp /DataVolume/shares/Public/Software/MyCloud/contentdir /etc/contentdir
# copy saved Twonky configuration file
cp /DataVolume/shares/Public/Software/MyCloud/twonkyserver.ini /CacheVolume/twonkymedia/twonkyserver.ini
# restart Twonky server
/etc/init.d/twonky start
# stop RESTSDK server daemon
# for OS3 only
#/etc/rc2.d/S20restsdk-serverd stop
# stop unwanted wakeups
#mount -o remount,noatime,nodiratime /dev/root /
@cpt_paranoia, can you post an example of your twonkyserver.ini so others can see what changes you’ve made to it if any? Or expound on the changes you made so others can understand what changes they should make on their end to the twonkyserver.ini.
Also what is the purpose of copying the /etc/contentdir? Under the single bay My Cloud running the latest v4.x firmware I don’t appear to have a /etc/contentdir directory.
I haven’t made many changes to the .INI file, apart from those mentioned in the FAQ. These are to do with the aggregation folders.
I copy the saved versions of the files ‘just in case’; they shouldn’t normally be needed.
Also what is the purpose of copying the /etc/contentdir? Under the single bay My Cloud running the latest v4.x firmware I don’t appear to have a /etc/contentdir directory.
Really? [sigh] Have they mucked about with it? I found that location because the Twonky startup script calls writeTwonkyContentDir.sh, which uses that file.
I’m still running 04.01.01-413. But maybe that’s changed too. I haven’t checked for some time, because everything is working… Obviously, I have the file because I copy it there.
Ah: the OP says their version gets overwritten, so theirs is obviously still in use. In 04.04.02-105
Actually the question was for DNO. Since he is missing the user-start file.
But a question for you is why do you do the update-rc.d wdmcserverd disable? You have already stopped the process. Doesn’t the update disable the script until you enable it again? If you were to rename the user-start file and reboot. The system would not be in the original condition. Since those two processes would not be running.
Wow, thank you all for the responses last night (Friday is beer and curry night so I didn’t check in…). A lot for me to understand here. I wouldn’t have known what Gen my unit is RAC - thanks ctp.
So, I think what I need to do is:
make sure the share setting is as I want them in the Twonky GUI
stop Twonky - turn off Media Sharing in the My Cloud GUI?
modify (if needed) the contentdir file to suit
But, I’m not sure about the user-start after your input rac8006, so I’ve just been to /etc/rc2.d and there is a link, as you say, to a user-start as below:
Well, I’ve truly gone and screwed it up now. After my last changes to the user-start file I initiated a reboot from the GUI, and after a while it was stuck at flashing/continuous white LED, while the GUI says Initializing. So I went to bed after a few cans and a bottle of wine. But it was still the same this morning but my head is worse. So I pulled the power and held in the reset button while re-attaching power and held it for 40+ seconds, and it’s still the same white flashing LED.
Oddly, I can navigate to it through the windows file explorer and see my music files, but the WD GUI still says Initializing. Anything else I can do or do I buy a Synology or something…