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

bin access to script replacements #622

Closed
fommil opened this issue Jul 8, 2015 · 2 comments
Closed

bin access to script replacements #622

fommil opened this issue Jul 8, 2015 · 2 comments
Labels
feature request universal Zip, tar.gz, tgz and bash issues

Comments

@fommil
Copy link

fommil commented Jul 8, 2015

in the universal bin folder, it would be great to have access to the script replacements, e.g. classpath and a few other bits and bobs.

http://www.scala-sbt.org/sbt-native-packager/formats/universal.html

As a workaround, one can call out to find and source the /etc/defaults file

@muuki88
Copy link
Contributor

muuki88 commented Jul 8, 2015

The current way to do this is using bashScriptExtraDefines. You can add arbitrary bash stuff there.

However what you want to do is, create a complete new bashscript and have access to the replacements, right?

@fommil
Copy link
Author

fommil commented Jul 8, 2015

yes, that's right. Solid example: I have a service that I'm deploying and the run book looks like this:

  1. install the software
  2. run the database evolution script
  3. start the service
  4. (wait for some log message)
  5. run the migration script

both scripts are separate, but would benefit greatly from having access to the classpath and other variables. As it is, I hack it by adding this:

cd "`dirname $0`/../"

[ -e /etc/default/NAME ] && . /etc/default/NAME
[ -e /etc/sysconfig/NAME ] && . /etc/sysconfig/NAME

CLASSPATH=`find lib -mindepth 1 -maxdepth 1 -type f -name "*.jar" | tr '\n' ':'`

to my scripts.

@muuki88 muuki88 added feature request universal Zip, tar.gz, tgz and bash issues labels Mar 20, 2016
@fommil fommil closed this as completed Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request universal Zip, tar.gz, tgz and bash issues
Projects
None yet
Development

No branches or pull requests

2 participants