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

Upstart: source /etc/default/${{app_name}} #641

Closed
wants to merge 1 commit into from
Closed

Conversation

nafg
Copy link

@nafg nafg commented Aug 4, 2015

This should fix the limitation mentioned in http://www.scala-sbt.org/sbt-native-packager/archetypes/java_server/customize.html#linux-configuration:

The server archetype adds an additional way with an etc-default file placed in src/templates, which currently only works for SystemV.

This should fix the limitation mentioned in http://www.scala-sbt.org/sbt-native-packager/archetypes/java_server/customize.html#linux-configuration:
> The server archetype adds an additional way with an etc-default file placed in src/templates, which currently only works for SystemV.
@kardapoltsev
Copy link
Member

LGTM.

@@ -27,7 +27,11 @@ end script
# set the working directory of the job processes
chdir ${{chdir}}

setuid ${{daemon_user}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we had that at one point in time and it didn't work for some reason. On which systems did you test this?

Copy link

Choose a reason for hiding this comment

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

Just curious now if we are executing without sudo, unless I am wrong I think the command should be sudo bin/${{exec}}

I am seeing issues with the daemon_user not having enough permissions

Copy link

Choose a reason for hiding this comment

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

Ive tried this < daemon_user > is not in the sudoers file.

Also to make this work I had to do this
sudo chown ${{daemon_user}}:${{daemon_group}} -R /usr/share/${{app_name}}l/

Copy link
Contributor

Choose a reason for hiding this comment

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

You don't want to do sudo chown ${{daemon_user}}:${{daemon_group}} -R /usr/share/${{app_name}}l/
/usr/share/<app> is generally owned by root. If you need write access to disk you add linuxPackageMappings with exactly the permissions you need.

Why should the daemonUser be in the sudoers file?

@muuki88
Copy link
Contributor

muuki88 commented Aug 4, 2015

Nice :) see my one comment. IIRC we had issues with the setuid not working, but I don't remember why.

Can you fix the test? debian / test-executableScriptName . see the wiki page on how to run the tests.

@muuki88
Copy link
Contributor

muuki88 commented Aug 11, 2015

@nafg you had time to look into this, or do you need any help?

@nafg
Copy link
Author

nafg commented Aug 11, 2015

It was Ubuntu. I haven't had time.

On Tue, Aug 11, 2015, 6:10 PM Nepomuk Seiler [email protected]
wrote:

@nafg https://github.com/nafg you had time to look into this, or do you
need any help?


Reply to this email directly or view it on GitHub
#641 (comment)
.

@timcharper
Copy link
Contributor

FYI, I updated the documentation in my PR saying that upstart specifically doesn't source /etc/default/.... #745

@muuki88 muuki88 closed this Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants