# emonSD issues created using new scripts + emonhub environment file

**URL:** <https://community.openenergymonitor.org/t/emonsd-issues-created-using-new-scripts-emonhub-environment-file/10918>\
**Category:** emonSD\
**Created:** [11 May 2019 09:45 UTC](https://community.openenergymonitor.org/t/emonsd-issues-created-using-new-scripts-emonhub-environment-file/10918 "2019-05-11T09:45:32Z")\
**Posts on this page:** 1\
**Showing post:** 49

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [25 May 2019 14:55 UTC](https://community.openenergymonitor.org/t/emonsd-issues-created-using-new-scripts-emonhub-environment-file/10918/49 "2019-05-25T14:55:47Z")

</div>

I think Im edging towards the Environment file solution for setting the service paths and using /opt/emon/emonhub directly.

We discussed the use of /opt over /usr here:  
[https://community.openenergymonitor.org/t/emonsd-next-steps/10426/106](https://community.openenergymonitor.org/t/emonsd-next-steps/10426/106) @djh said:

> [@emonSD next steps](https://community.openenergymonitor.org/t/emonsd-next-steps/10426/106):
>
> /opt/package-name for code and move data directories to /var/opt/package-name for data after installation are reasonable places for external products to be placed. If a distro packages a product and releases it, then it will typically put it under /usr with data under /var/lib

Given that in this case the distro is not packaging the ‘product’ is it not therefore correct to use /opt directly?

The precise location aside, one of the goals of this installation script is to provide flexible installation paths rather than nailing everything down. I know we are still a number of steps away from that (e.g /var/www discussion), but perhaps using the environment file to allow emonhub to either be installed by our installer or perhaps if someone wants to do so be packaged independently and installed by the distro into /usr/local or other relevant location?

I haven’t tried using an environment file with systemd yet so I’m assuming this is possible and not bad practice

---

_[View the full topic](https://community.openenergymonitor.org/t/emonsd-issues-created-using-new-scripts-emonhub-environment-file/10918)._
