Skip to content

Commit

Permalink
Ensure application is running on the installed directory in the RPM-b…
Browse files Browse the repository at this point in the history
…ased distribution

Reinstate the fix in PR #653 that was accidentally removed by PR #661
  • Loading branch information
fsat committed Sep 10, 2015
1 parent f8fbfd1 commit d3ae71f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -38,6 +38,7 @@

INSTALL_DIR="${{chdir}}"
[ -n "${PACKAGE_PREFIX}" ] && INSTALL_DIR="${PACKAGE_PREFIX}/${{app_name}}"
cd $INSTALL_DIR

exec="$INSTALL_DIR/bin/${{exec}}"
prog="${{app_name}}"
Expand Down
6 changes: 6 additions & 0 deletions src/sbt-test/rpm/sysvinit-rpm/build.sbt
Expand Up @@ -32,6 +32,12 @@ TaskKey[Unit]("unzipAndCheck") <<= (baseDirectory, packageBin in Rpm, streams) m
assert(scriptlets contains "deleteUser rpm-test", "deleteUser rpm not present in \n" + scriptlets)

val startupScript = IO.read(baseDir / "etc" / "init.d" / "rpm-test")
assert(startupScript contains
"""
|INSTALL_DIR="/usr/share/rpm-test"
|[ -n "${PACKAGE_PREFIX}" ] && INSTALL_DIR="${PACKAGE_PREFIX}/rpm-test"
|cd $INSTALL_DIR
|""".stripMargin, "Ensuring application is running on the install directory is not present in \n" + startupScript)
assert(startupScript contains """RUN_CMD="$exec >> /var/log/rpm-test/test.log 2>&1 &"""", "Setting key rpmDaemonLogFile not present in \n" + startupScript)

// TODO check symlinks
Expand Down

0 comments on commit d3ae71f

Please sign in to comment.