com.netflix.gradle.plugins.daemon.LegacyInstallCmd.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-ospackage-plugin Show documentation
Show all versions of gradle-ospackage-plugin Show documentation
Provides a task similar to Tar and Zip for constructing RPM and DEB package files.
package com.netflix.gradle.plugins.daemon
class LegacyInstallCmd {
static String create(Map ctx) {
if (ctx.isRedHat) {
"/sbin/chkconfig ${ctx.daemonName} on"
} else {
List runLevels = ctx.runLevels as List
String startRunLevels = runLevels.join(' ')
String stopRunLevels = ([0, 1, 2, 3, 4, 5, 6] - runLevels).join(' ')
"/usr/sbin/update-rc.d ${ctx.daemonName} start ${ctx.startSequence} ${startRunLevels} . stop ${ctx.stopSequence} ${stopRunLevels} ."
}
}
}