PalisadoesFoundation / pattoo

pattoo stores IoT timeseries data polled by pattoo agents
https://palisadoesfoundation.github.io/pattoo.github.io/
GNU General Public License v3.0
3 stars 7 forks source link

systemd template files need to be placed in correct directory for Ubuntu / CentOS #299

Open palisadoes opened 4 years ago

palisadoes commented 4 years ago

The location for systemd unit files are different for Centos and Ubuntu. The current installation script only places the files in the Ubuntu location, which does not exist in CentOS. The respective locations are:

One way of determining the correct location is to run this CLI command, which will return a search path list of directories where the files are expected to be located.

Which will give a response like this for Centos:

And like this for Ubuntu:

The systed files should not be placed in any directory with the following strings:

This should usually leave one or two options, one or more of which may not exist. The files should be placed in the remaining directory that does exist.

DangaRanga commented 4 years ago

Would storing the unit paths for both systems as variables, then using a conditional statement to place the files in the appropriate directory for the respective system? (or should I try to make it more flexible for future linux distributions?

palisadoes commented 4 years ago

Make it flexible for any distribution. There is no guarantee of flawless installation otherwise

On Mon, Jun 1, 2020, 9:51 PM Jason Gayle notifications@github.com wrote:

Would storing the unit paths for both systems as variables, then using a conditional statement to place the files in the appropriate directory for the respective system? (or should I try to make it more flexible for future linux distributions?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PalisadoesFoundation/pattoo/issues/299#issuecomment-637270680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAYCGZKD754SYTY6VGNTBDRUSAN3ANCNFSM4NQL3AVA .