-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create home directory for daemon users in LinuxPlugin (#1536)
- Loading branch information
1 parent
3561d0b
commit 5216d42
Showing
12 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
enablePlugins(JavaServerAppPackaging) | ||
|
||
daemonUser in Linux := "daemonuser" | ||
daemonGroup in Linux := "daemongroup" | ||
daemonHome in Linux := "/var/lib/customdaemonhome" | ||
|
||
mainClass in Compile := Some("empty") | ||
|
||
name := "debian-test" | ||
version := "0.1.0" | ||
maintainer := "Josh Suereth <[email protected]>" | ||
|
||
packageSummary := "Test debian package" | ||
packageDescription := """A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
TaskKey[Unit]("checkControlFiles") := { | ||
val debian = target.value / "debian-test-0.1.0" / "DEBIAN" | ||
val postinst = IO.read(debian / "postinst") | ||
val postrm = IO.read(debian / "postrm") | ||
assert( | ||
postinst contains """addUser daemonuser "" daemongroup "debian-test daemon-user" "/bin/false" "/var/lib/customdaemonhome"""", | ||
"postinst misses useradd for daemonuser with custom home directory: " + postinst | ||
) | ||
() | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/debian/daemon-user-homedir-deb/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % sys.props("project.version")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Run the debian packaging. | ||
> debian:packageBin | ||
$ exists target/debian-test_0.1.0_all.deb | ||
|
||
# Check defaults | ||
$ exists target/debian-test-0.1.0/DEBIAN/prerm | ||
$ exists target/debian-test-0.1.0/DEBIAN/postinst | ||
|
||
# Check files for defaults | ||
> checkControlFiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters