It is currently Sun Jan 17, 2021 11:10 pm
All times are UTC + 8 hours

Restart services via terminal plus cron job?

Restart services via terminal plus cron job?

Postby cjens19 » Tue Jan 12, 2021 7:07 am

Been scouring the web for a while now but haven't found anything that I need. I have an app on my Asustor that keeps dying (unsure why yet, don't have the bandwidth to troubleshoot), but it does come back up after I restart the app in the App Center. I'd like to automate this restart via a Cron job if possible, but I'm not sure if such a thing is possible with the ADM-nix OS.

Does anyone know how to restart apps/services via terminal? systemctl is not installed.

Does anyone know if it's possible to run cron jobs or some sort of scheduler? This is a moot point if it's not possible to restart services via terminal.

Thanks!
cjens19
 
Posts: 3
Joined: Wed Apr 10, 2019 10:08 pm

Re: Restart services via terminal plus cron job?

Postby orion » Tue Jan 12, 2021 1:14 pm

Both ways should work. You can post details if you got problems. And every app acts in different ways.
PS: "crontab -e" in command line to edit.
User avatar
orion
 
Posts: 2850
Joined: Wed May 29, 2013 11:09 am

Re: Restart services via terminal plus cron job?

Postby cjens19 » Tue Jan 12, 2021 9:33 pm

Thank you for the crontab command. What is the command for restarting apps?
cjens19
 
Posts: 3
Joined: Wed Apr 10, 2019 10:08 pm

Re: Restart services via terminal plus cron job?

Postby orion » Wed Jan 13, 2021 9:54 am

cjens19 wrote:Thank you for the crontab command. What is the command for restarting apps?

Every app acts in different ways.
User avatar
orion
 
Posts: 2850
Joined: Wed May 29, 2013 11:09 am

Re: Restart services via terminal plus cron job?

Postby cjens19 » Wed Jan 13, 2021 10:03 pm

Understand. Just wondering if there was a system command for restarting services. Like 'systemctl restart some.service' restarts stuff in ubuntu. I realize ADM is its own beast and has its own commands, just wondered if there was a similar command in ADM.

Also, is there a terminal command that shows all processes and names? Sort of like the GUI task manager but with real names of the executables?

Thank you for your responses, it's appreciated.
cjens19
 
Posts: 3
Joined: Wed Apr 10, 2019 10:08 pm

Re: Restart services via terminal plus cron job?

Postby orion » Thu Jan 14, 2021 9:45 am

Most of startup scripts of system services are located onto /usr/builtin/etc/init.d/
And all of apps are located onto /volume1/.@plugins/AppCentral/

I believe you can check them, then you should know what you need.

To show process: "ps" and "top" are useful commands.
User avatar
orion
 
Posts: 2850
Joined: Wed May 29, 2013 11:09 am

Return to ADM general

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest