×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Auto-starting indiserver

  • Posts: 86
  • Thank you received: 5
Newbie question: how do people normally get indiserver to start automatically (in my case under Arch Linux)?

I've tried a systemd unit (see below) but when started this way the paths for configuration files turn out strange (I guess because I'm not logged in at the time) and, maybe because of this, the ASI CCD driver doesn't work properly for me.

How should it be done?

[Unit]
Description=Indi server
 
[Service]
ExecStart=/usr/bin/indiserver -vvv indi_asi_ccd indi_eqmod_telescope
 
[Install]
WantedBy=multi-user.target

Rob
8 years 2 weeks ago #7483

Please Log in or Create an account to join the conversation.

Don't know about systemd stuff, but never start with -vvv unless you want to debug something. For something to run in the background, it is enough to run it as:
indiserver -m 100 indi_asi_ccd indi_eqmod_telescope

Also, for this to work, the ASI CCD must be connected and powered and recognized the the USB subsystem before INDI server is invoked.
8 years 2 weeks ago #7484

Please Log in or Create an account to join the conversation.

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic Auto-starting indiserver

Understood, -vvv a legacy from trying to figure out why things don't work.

Rob
8 years 2 weeks ago #7485

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
Hi
You can use startup scripts I wrote for INDI. These are inline with standard startup scripts for any service on linux.
1) place indiserver script in /etc/init.d/ and make it executable by running chmod 755 /etc/init.d/indiserver
2) place indi.conf in /etc/indi.conf
3) configure your drivers in /etc/indi.conf by changing DRIVERS variable
4) activate your new service by running sudo update-rc.d indiserver defaults
5) enjoy :-)

NOTE: rename attached files and remove .txt extention from their names - this is added to post it on the forum only.
To do this after downloading files BEFORE running the above procedure run: mv indiserver.txt indiserver && mv indi.conf.txt indi.conf

File Attachment:

File Name: indiserver.txt
File Size:2 KB

File Attachment:

File Name: indi.conf.txt
File Size:0 KB
Last edit: 8 years 2 weeks ago by Radek Kaczorek. Reason: typo
8 years 2 weeks ago #7504
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic Auto-starting indiserver

Ah, my Linux distribution is systemd I'm afraid, rather than init.d. I don't believe that you can use one with t'other.

Rob
8 years 2 weeks ago #7505

Please Log in or Create an account to join the conversation.

  • Posts: 86
  • Thank you received: 5

Replied by Rob Meades on topic Auto-starting indiserver

The answer, at least for me, on systemd was to modify the service file to be:

[Unit]
Description=Indi server
 
[Service]
User=rob
PAMName=login
ExecStart=/usr/bin/indiserver indi_asi_ccd indi_eqmod_telescope
 
[Install]
WantedBy=multi-user.target

This starts indi with me as the user and all the configuration paths then work correctly. As knro pointed out, I should in theory ensure that the CCD has loaded first but, in fact, that doesn't seem to be an issue so I've not bothered finding out how I put a dependency on it.

Rob
8 years 2 weeks ago #7511

Please Log in or Create an account to join the conversation.

  • Posts: 66
  • Thank you received: 9

Replied by djibb on topic Auto-starting indiserver

This part has to be put on "tutorials".

"HOW TO LAUNCH INDISERVER at BOOT with systemd"

It works well :)
7 years 8 months ago #9450

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 2

Replied by Clément on topic Auto-starting indiserver

With the autostart capabilities that the INDI Web Manager now provides, it is not necessary to have a SystemD script for INDI anymore :) Just check the box "autostart" in the Web Manager and it will start INDI when the Web Manager starts.
7 years 8 months ago #9464

Please Log in or Create an account to join the conversation.

  • Posts: 66
  • Thank you received: 9

Replied by djibb on topic Auto-starting indiserver

YEP :)

It's a good idea... but there's a bug in systemd file to launch indiwebserver :
There's 2 ExecStart lines : indilib.org/support/tutorials/162-indi-web-manager.html
ExecStart=/usr/bin/python /home/odroid/servermanager/drivermanager.py
ExecStart=/usr/bin/python /home/odroid/servermanager/autostart.py

and service is an "idle" one. I've had a bug : with idle, only one line is accepted. So i've commented the second one :)... but no autostart capabilities anymore...
Last edit: 7 years 8 months ago by djibb.
7 years 8 months ago #9471

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 2

Replied by Clément on topic Auto-starting indiserver

The tutorial is not up-to-date, in the Github the second ExecStart has been transformed into a ExecStartPost: github.com/knro/indiwebmanager/blob/mast...diwebmanager.service

The only issue I have right now is that the python package "requests" is a prerequisite but is sometimes not installed on some systems. I have posted a ticket on the GitHub page. I suggest to add the following to the installation instructions:
sudo apt-get install python-pip
pip install --upgrade pip
pip install requests
7 years 8 months ago #9473

Please Log in or Create an account to join the conversation.

  • Posts: 66
  • Thank you received: 9

Replied by djibb on topic Auto-starting indiserver

thanks. it's done.
7 years 8 months ago #9475

Please Log in or Create an account to join the conversation.

Time to create page: 0.368 seconds