Skip to content

Commit

Permalink
[#218] Debian builds attempt to make use of chkconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeli authored Apr 10, 2019
1 parent b07246f commit 5535856
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,30 @@ dependencies {
}
}

buildRpm {
postInstall 'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/current && ' +
'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/legacy && ' +
'chown -R hdfs: /usr/local/nn-analytics/dfs && ' +
'mkdir -p -m 0755 /usr/local/nn-analytics/db && ' +
'chown -R hdfs: /usr/local/nn-analytics/db &&' +
'mkdir -p -m 0755 /var/log/nn-analytics && ' +
'chown hdfs: /var/log/nn-analytics && ' +
'cp /usr/local/nn-analytics/bin/nn-analytics /etc/init.d/ && ' +
'chkconfig --add nn-analytics'
}

buildDeb {
postInstall 'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/current && ' +
'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/legacy && ' +
'chown -R hdfs: /usr/local/nn-analytics/dfs && ' +
'mkdir -p -m 0755 /usr/local/nn-analytics/db && ' +
'chown -R hdfs: /usr/local/nn-analytics/db &&' +
'mkdir -p -m 0755 /var/log/nn-analytics && ' +
'chown hdfs: /var/log/nn-analytics && ' +
'cp /usr/local/nn-analytics/bin/nn-analytics /etc/init.d/ && ' +
'update-rc.d nn-analytics defaults'
}

ospackage {
packageName = 'nn-analytics'
version = versioning.info.full.startsWith("null") ? "1.2." + hadoopVersion : versioning.info.full
Expand All @@ -181,16 +205,6 @@ ospackage {
user 'root'
permissionGroup 'root'

postInstall 'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/current && ' +
'mkdir -p -m 0755 /usr/local/nn-analytics/dfs/name/legacy && ' +
'chown -R hdfs: /usr/local/nn-analytics/dfs &&' +
'mkdir -p -m 0755 /usr/local/nn-analytics/db && ' +
'chown -R hdfs: /usr/local/nn-analytics/db &&' +
'mkdir -p -m 0755 /var/log/nn-analytics && ' +
'chown hdfs: /var/log/nn-analytics &&' +
'cp /usr/local/nn-analytics/bin/nn-analytics /etc/init.d/ &&' +
'chkconfig --add nn-analytics'

into '/usr/local/nn-analytics/'

from('build/version.properties') {
Expand Down

0 comments on commit 5535856

Please sign in to comment.