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

allow running lokinet as root on windows #1347

Merged
merged 5 commits into from Sep 17, 2020
Merged

Conversation

despair86
Copy link
Contributor

@despair86 despair86 commented Sep 16, 2020

by relocating to ($PROGRAMDATA/.lokinet)

  • oops forgot to eat my own command line args
  • fix DNS client configuration at startup

  ($PROGRAMDATA/.lokinet/lokinet.ini)
- oops forgot to eat my own command line args
daemon/main.cpp Outdated Show resolved Hide resolved
@@ -329,8 +332,7 @@ lokinet_main(int argc, char* argv[])
options.add_options()("v,verbose", "Verbose", cxxopts::value<bool>())
#ifdef _WIN32
("install", "install win32 daemon to SCM", cxxopts::value<bool>())(
"remove", "remove win32 daemon from SCM", cxxopts::value<bool>())(
"win32-daemon", "do not use interactively", cxxopts::value<bool>())
Copy link
Contributor Author

@despair86 despair86 Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we no longer need the entry in cxxopts..................

@despair86 despair86 marked this pull request as draft September 16, 2020 07:02
ReportSvcStatus(SERVICE_START_PENDING, NO_ERROR, 3000);
// SCM clobbers startup args, regenerate them here
argc = 2;
argv[1] = "c:/programdata/.lokinet/lokinet.ini";
Copy link
Contributor Author

@despair86 despair86 Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.....................because we eat it here: becomes [path to lokinet] [path to config file]
TODO: for internal testing use $ALLUSERSPROFILE/Appplication Data/.lokinet (programdata didn't exist yet)

@despair86 despair86 marked this pull request as ready for review September 16, 2020 07:42
@despair86
Copy link
Contributor Author

this fixed the service startup crash: scm kept chewing up the command line arguments

@despair86
Copy link
Contributor Author

indeed after this and #1348 i am no longer making much of an effort to deal with pre-windows 8
while it remains technically possible to do so
no longer going out of my way to do releases in this manner

@majestrate majestrate merged commit 7136f77 into oxen-io:dev Sep 17, 2020
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.

None yet

2 participants