Welcome to the forum, Guest

  • Page:
  • 1
  • 2

TOPIC: How do start YACReaderLibraryServer on OSX?

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4293

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

How do start the headless server in OSX? I guess though a plist, but I can't find one that's working, nor I was able to write one on my own. Any hint?
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4295

Luis Ángel

Offline

Administrator

Posts: 1794

Thank you received: 384

Karma: 35

Run it from the console, YACReaderLibraryServer is a console app for macos it is bundled so it has all the libraries it needs with the appropriate folders structure.
./YACReaderLibraryServer/Contents/MacOS/YACReaderLibraryServer start
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: t.ly/ODFV
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4297

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

Well, yes, but no ;)

headless also means I shouldn't be bordered to open a terminal to run it. It should be handled as a service.

On GNU/Linux I should be able to run it through some initi.d script, on Mac OS I should be able to accomplish that through a plist xml file to feed launchctl.

I've created some, but it never starts, almost as if it can only run on foreground. If that's it, then it's not a server, pardon me :evil:
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4299

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

Uhm... never mind what I said earlier today: I've got it to work, though it shows there are 0 libraries configured.

As soon as I figure this out, I'll post the plist.

P.S.: would be nice to add options and commands to the server (options like --set-port --use-library etc.. and commands like show-running-config etc..) which would help with debugging.
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4300

Luis Ángel

Offline

Administrator

Posts: 1794

Thank you received: 384

Karma: 35

There are instructions in the source code to run the server using systemd as a service in linux.

systemctl is used to enable the service, maybe you can use launchctl in macos.

Since YACReader has to run in multiple platforns choosing the right way to running YACReaderLibraryServer is up to the user.

One limitation is that YACReaderLibrary and YACReaderLibraryServer can't run at the same time. The idea to fix this is that the service should be replaced by YACReaderLibrary when it is running and after it closes the service should start running again. Patches are welcome.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: t.ly/ODFV
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4302

Luis Ángel

Offline

Administrator

Posts: 1794

Thank you received: 384

Karma: 35

cloudy wrote:
P.S.: would be nice to add options and commands to the server (options like --set-port --use-library etc.. and commands like show-running-config etc..) which would help with debugging.

Sure, implementing additional commands should be pretty straight forward, feel free to send a pull request in github.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: t.ly/ODFV
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4305

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

I just discovered something.

The plist I quickly draft for running YACReaderLibraryServer as a service with launchctl is actually working fine on Mac OS 10.13.

The problem I had, was due to the fact that I was working on a Mac OS 10.14.

It seems to listen on random ports instead of the one configured in the ini file, when launched on Mojave.
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4306

Luis Ángel

Offline

Administrator

Posts: 1794

Thank you received: 384

Karma: 35

If the port configured is already being used the server chooses another on randomly.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: t.ly/ODFV
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4307

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

Yes, that must be it.

I am sure there was no other service running on that port, but for some reason, every time I started the server it started listening on two different ports: the one set in the ini file, and another one random (never showing the actual library, anyway, just a blank page).

After starting fresh it's now working as expected.

I still don't see anything on Safari for Mojave, though the important thing is I see the content of the library from the iPad.
The administrator has disabled public write access.

How do start YACReaderLibraryServer on OSX? 2 years 11 months ago #4318

cloudy

Offline

Fresh Boarder

Posts: 12

Thank you received: 3

Karma: 1

I attached a couple of launchd plist files.

The first one (

Attachment not found

) serves to start the headless server, and tries to keep it running.
The second one (

Attachment not found


) is meant to auto-update the library database whenever the Library source folder is changed.

Both files should be put in
~/Library/LaunchAgents/
(just rename them as *.plist).

Pros & Cons:

Pros: never worry about manually starting or updating the library
Cons: YACReaderLibrary cannot run, as it's antagonist to YACReaderLibraryServer

P.S.: Of course you can always run only the second file, and having the library updated on cue, and still have the ability to fire up YACReaderLibrary
Last Edit: 2 years 6 months ago by cloudy.
The administrator has disabled public write access.
The following user(s) said Thank You: Luis Ángel
  • Page:
  • 1
  • 2
Powered by Kunena Forum