Skip to content

Commit

Permalink
FIX #391 Fixing all lintian errors and some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Nov 3, 2014
1 parent 9724fbb commit 9d66332
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
startService() {
app_name=$1
if hash update-rc.d 2>/dev/null; then
if hash update-rc.d >/dev/null 2>&1; then
echo "Adding $app_name to autostart using update-rc.d"
update-rc.d $app_name defaults
service $app_name start
Expand All @@ -24,7 +24,7 @@ startService() {
#
stopService() {
app_name=$1
if hash update-rc.d 2>/dev/null; then
if hash update-rc.d >/dev/null 2>&1; then
echo "Removing $app_name from autostart using update-rc.d"
update-rc.d -f $app_name remove
service $app_name stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ object JavaServerAppPackaging extends AutoPlugin {
linuxPackageMappings <++= (makeEtcDefault, packageName in Linux) map { (conf, name) =>
conf.map(c => LinuxPackageMapping(Seq(c -> ("/etc/default/" + name)),
LinuxFileMetaData(Users.Root, Users.Root, "644")).withConfig()).toSeq
},

// === /var/run/app pid folder ===
linuxPackageMappings <+= (packageName in Linux, daemonUser in Linux, daemonGroup in Linux) map { (name, user, group) =>
packageTemplateMapping("/var/run/" + name)() withUser user withGroup group withPerms "755"
}

)
Expand Down Expand Up @@ -100,6 +95,9 @@ object JavaServerAppPackaging extends AutoPlugin {
serverLoading in Debian) map makeStartScript,
linuxPackageMappings <++= (packageName, linuxMakeStartScript, serverLoading, defaultLinuxStartScriptLocation) map startScriptMapping
)) ++ Seq(
// === Daemon User and Group ===
daemonUser in Debian <<= daemonUser in Linux,
daemonGroup in Debian <<= daemonGroup in Linux,
// === Maintainer scripts ===
debianMakePreinstScript <<= (target in Universal, serverLoading in Debian, linuxScriptReplacements) map makeMaintainerScript(Preinst),
debianMakePostinstScript <<= (target in Universal, serverLoading in Debian, linuxScriptReplacements) map makeMaintainerScript(Postinst),
Expand All @@ -117,8 +115,16 @@ object JavaServerAppPackaging extends AutoPlugin {
requiredStopFacilities in Rpm <<= (serverLoading) apply defaultFacilities,
linuxScriptReplacements <++= (requiredStartFacilities, requiredStopFacilities, startRunlevels, stopRunlevels, serverLoading) apply
makeStartScriptReplacements,
linuxScriptReplacements += JavaServerLoaderScript.loaderFunctionsReplacement(serverLoading.value, ARCHETYPE)
linuxScriptReplacements += JavaServerLoaderScript.loaderFunctionsReplacement(serverLoading.value, ARCHETYPE),

// === /var/run/app pid folder ===
linuxPackageMappings <+= (packageName, daemonUser, daemonGroup) map { (name, user, group) =>
packageTemplateMapping("/var/run/" + name)() withUser user withGroup group withPerms "755"
}
)) ++ Seq(
// === Daemon User and Group ===
daemonUser in Rpm <<= daemonUser in Linux,
daemonGroup in Rpm <<= daemonGroup in Linux,
// === Startscript creation ===
linuxStartScriptTemplate := JavaServerLoaderScript(
script = startScriptName((serverLoading in Rpm).value, Rpm),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ object DebianPlugin extends AutoPlugin with DebianNativePackaging {
t
},
// Replacement for ${{header}} as debian control scripts are bash scripts
linuxScriptReplacements += ("header" -> "#!/bin/sh\n")
linuxScriptReplacements += ("header" -> "#!/bin/sh\nset -e")

// Adding package specific implementation settings
))
Expand Down

0 comments on commit 9d66332

Please sign in to comment.