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

Change Default Script Location on Nix Systems #55

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SoarinFerret
Copy link
Contributor

Currently, scripts are being run from the executable location on *nix systems. This does not work when using read-only filesystems.

Instead, using /tmp/trmm ensures that we have a read/write directory location.

Fixes #39

(I have been using a similar patch to this on most of my systems for at least a year, and have not noticed any issues)

@wh1te909
Copy link
Member

IIRC we used to do everything in /tmp, but there were issues like #32 and other issues with /tmp, so a quick and easy fix was to just do everything in the same dir as the executable and ever since then no more issues, except yours of course. your change will cause the same issue to surface again so we'll need to figure something out that works for everyone.

@SoarinFerret
Copy link
Contributor Author

Ah, good call. What if we used a new directory, like /opt/tacticalrmm? Otherwise, if you are open to it, I could add a cmdline flag to set the script execution directory. That way in more "odd" scenarios like mine, I can update my systemd service config to reference the new location, and the default will stay in the current working directory

@SoarinFerret
Copy link
Contributor Author

Alternatively, if we updated this to get the actual current working directory instead of the executable directory, all I would need to do is set WorkingDirectory= in the systemd service config

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

Successfully merging this pull request may close these issues.

Error Running Scripts due to Read-Only File System - NixOS
2 participants