Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run a Harbour application as a service on a Linux Server #248

Open
nilton-medeiros opened this issue Jun 22, 2021 · 3 comments
Open

Comments

@nilton-medeiros
Copy link

I realized that everything in Harbour is geared to run on Windows. There is nothing here of examples of how to run an application in Harbour as an Ubuntu server service or CentOS server, without a GUI.

@alcz
Copy link
Contributor

alcz commented Jun 22, 2021

There are so many solutions to run something as a service. These days you'd probably like to see a systemd solution template.
Nobody contributed i guess. Other than that i highly doubt that everything in Harbour is geared to run on Windows.

There is simple posix deamon in hbunix contrib which puts app itself into the background:
https://github.com/harbour/core/blob/master/contrib/hbunix/tests/daemon.prg

You can add a line to cron using crontab -e
@reboot /path/to/app //gtnul

I hope that others will share their precious solutions. I'm not complaining that the gcc compiler does not help me in running an app as a service on Linux, maybe the others thought the same about Harbour, so we don't have anything else than posix deamon in the repository.

@prgwiz
Copy link

prgwiz commented Jun 22, 2021 via email

@nilton-medeiros
Copy link
Author

Hi @prgwiz, thank you very much for answering, I am inexperienced in Linux, I know the content above is an example and from what I understand it is a type of script, in which directory and with what name do I save it? This content points to several directories and files that I would have to look at to understand what it is doing, for example "CONF=/etc/hbnetio.conf", seems to be more complex than I expected. Someone must have a simpler example of Harbour as a service.

Translated with www.DeepL.com/Translator (free version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants