How to auto run megacli for syncing folder?

I installed entware and then megaci package.

I can run mega command to sync my mega folder to local storage with these command:
export MEGA_EMAIL=my_login
export MEGA_PWD=my_password
megasimplesync /my_local_storage /mega_folder &

But it will only run in the background for a period of time, maybe 1-2 hours.

My questions are:

  • How can I keep it running all the time in the background?
  • How to make it into a script and auto run at boot time?


Can’t be of much help here…
But systemd should work…I think :smiley:

Given that a .service file for this megacli app was created, you should be able to use
systemctl enable megacli to start the automatically start the app at every boot.
systemctl start megacliwill start the app as a service right now.