Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timb-machine/a3b2d27adcbbed34455e78f845198392 to your computer and use it in GitHub Desktop.
Save timb-machine/a3b2d27adcbbed34455e78f845198392 to your computer and use it in GitHub Desktop.
Adding persistence to WD MyCloud NAS device cron...
Say for exmaple, you wanted a cron entry that would run persist.sh every 5 minutes...
$ xmldbc -s /system_mgr/crond/list/count "9"
$ xmldbc -s /system_mgr/crond/list/name:9 "persist"
$ xmldbc -s /system_mgr/crond/persist/count "1"
$ xmldbc -s /system_mgr/crond/persist/item:1/method "3"
$ xmldbc -s /system_mgr/crond/persist/item:1/1 "*/5"
$ xmldbc -s /system_mgr/crond/persist/item:1/2 "*"
$ xmldbc -s /system_mgr/crond/persist/item:1/3 "*"
$ xmldbc -s /system_mgr/crond/persist/item:1/4 "*"
$ xmldbc -s /system_mgr/crond/persist/item:1/5 "*"
$ xmldbc -s /system_mgr/crond/persist/item:1/run '/usr/local/config/persist.sh &'
PS, there are likely some LPEs with this, since the UNIX socket is accessible and the server component can be forced to write to places a user can't write to...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment