Merge branch 'helma-🐜' into dependabot/gradle/org.mozilla-rhino-1.7.13
This commit is contained in:
commit
84f4a5f396
26 changed files with 160 additions and 125 deletions
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
@ -9,3 +9,5 @@ updates:
|
||||||
directory: "/" # Location of package manifests
|
directory: "/" # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
assignees:
|
||||||
|
- "p3k"
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
.gradle
|
.gradle
|
||||||
|
.idea
|
||||||
.settings
|
.settings
|
||||||
build
|
build
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ Clone this repository to your machine and start the build process with `./gradle
|
||||||
|
|
||||||
After all files are put into place start Helma by invoking `./bin/helma.bat` or `./bin/helma`, depending on whether you are on Windows or Linux / Unix / OS X, respectively. If the `java` command is not found, try setting the `JAVA_HOME` environment variable to the location of your Java installation.
|
After all files are put into place start Helma by invoking `./bin/helma.bat` or `./bin/helma`, depending on whether you are on Windows or Linux / Unix / OS X, respectively. If the `java` command is not found, try setting the `JAVA_HOME` environment variable to the location of your Java installation.
|
||||||
|
|
||||||
You can adjust server-wide settings in the `server.properties` file. For example, you could set the `smtp` property to the name of the SMTP server that Helma should use to send e-mail. Applications can be started or stopped by editing the `apps.properties` file through the web interface using the management application that is part of Helma.
|
You can adjust server-wide settings in the `server.properties` file. For example, you could set the `smtp` property to the name of the SMTP server that Helma should use to send e-mail. Applications can be started or stopped by editing the `apps.properties` file, or through the web interface using the management application that is part of Helma.
|
||||||
|
|
||||||
If all goes well you should be able to connect your browser to <http://localhost:8080> – port 8080 on the local machine, that is.
|
If all goes well you should be able to connect your browser to <http://localhost:8080> – port 8080 on the local machine, that is.
|
||||||
|
|
||||||
|
|
15
build.gradle
15
build.gradle
|
@ -21,6 +21,10 @@ allprojects {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version = new Date().format("yyyyMMdd")
|
version = new Date().format("yyyyMMdd")
|
||||||
|
@ -37,11 +41,6 @@ sourceSets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
// Wrapping implementation because it does not allow access to its files
|
// Wrapping implementation because it does not allow access to its files
|
||||||
// (i.e. cannot be resolved)
|
// (i.e. cannot be resolved)
|
||||||
|
@ -50,7 +49,7 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
implementation 'commons-codec:commons-codec:1.14'
|
implementation 'commons-codec:commons-codec:1.15'
|
||||||
implementation 'commons-fileupload:commons-fileupload:1.4'
|
implementation 'commons-fileupload:commons-fileupload:1.4'
|
||||||
implementation 'commons-logging:commons-logging:1.2'
|
implementation 'commons-logging:commons-logging:1.2'
|
||||||
implementation 'commons-net:commons-net:3.8.0'
|
implementation 'commons-net:commons-net:3.8.0'
|
||||||
|
@ -68,7 +67,6 @@ def rhinoJar = configurations.library.files.find { jar ->
|
||||||
jar.name.startsWith('rhino')
|
jar.name.startsWith('rhino')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
startScripts {
|
startScripts {
|
||||||
applicationName = 'helma'
|
applicationName = 'helma'
|
||||||
classpath = files('../launcher.jar')
|
classpath = files('../launcher.jar')
|
||||||
|
@ -117,6 +115,7 @@ applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
|
||||||
}
|
}
|
||||||
|
|
||||||
distTar {
|
distTar {
|
||||||
|
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||||
compression = Compression.GZIP
|
compression = Compression.GZIP
|
||||||
|
|
||||||
filesMatching(textFiles) {
|
filesMatching(textFiles) {
|
||||||
|
@ -125,6 +124,8 @@ distTar {
|
||||||
}
|
}
|
||||||
|
|
||||||
distZip {
|
distZip {
|
||||||
|
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||||
|
|
||||||
filesMatching(textFiles) {
|
filesMatching(textFiles) {
|
||||||
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
|
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
|
||||||
}
|
}
|
||||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,4 +1,4 @@
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
16
modules/helma/Chart.js
vendored
16
modules/helma/Chart.js
vendored
|
@ -18,12 +18,12 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview Fields and methods of the helma.Chart prototype
|
* @fileoverview Fields and methods of the helma.Chart prototype
|
||||||
* <br /><br />
|
* <br /><br />
|
||||||
* To use this optional module, its repository needs to be added to the
|
* To use this optional module, its repository needs to be added to the
|
||||||
* application, for example by calling app.addRepository('modules/helma/Chart.js')
|
* application, for example by calling app.addRepository('modules/helma/Chart.js')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// take care of any dependencies
|
// take care of any dependencies
|
||||||
app.addRepository('modules/helma/jxl.jar');
|
app.addRepository('modules/helma/jxl-2.5.7.jar');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the global namespace if not existing
|
* Define the global namespace if not existing
|
||||||
|
@ -55,12 +55,12 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
||||||
|
|
||||||
var workbook, file;
|
var workbook, file;
|
||||||
try {
|
try {
|
||||||
file = new java.io.File(fpath);
|
file = new java.io.File(fpath);
|
||||||
workbook = JXLPKG.getWorkbook(file);
|
workbook = JXLPKG.getWorkbook(file);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof TypeError == false)
|
if (e instanceof TypeError == false)
|
||||||
throw(e);
|
throw(e);
|
||||||
throw("helma.Chart needs " + JXLPKGNAME +
|
throw("helma.Chart needs " + JXLPKGNAME +
|
||||||
" in lib/ext or application directory " +
|
" in lib/ext or application directory " +
|
||||||
"[" + JXLPKGURL + "]");
|
"[" + JXLPKGURL + "]");
|
||||||
}
|
}
|
||||||
|
@ -98,9 +98,9 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
||||||
* Renders the Excel spreadsheet as XHTML table.
|
* Renders the Excel spreadsheet as XHTML table.
|
||||||
*/
|
*/
|
||||||
this.render = function() {
|
this.render = function() {
|
||||||
res.write('<table border="0" cellspacing="1" class="' +
|
res.write('<table border="0" cellspacing="1" class="' +
|
||||||
prefix + 'table">\n');
|
prefix + 'table">\n');
|
||||||
|
|
||||||
var rowBuf = [];
|
var rowBuf = [];
|
||||||
var rows = sheet.getRows();
|
var rows = sheet.getRows();
|
||||||
var max = 0;
|
var max = 0;
|
||||||
|
@ -110,7 +110,7 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
||||||
max = row.length;
|
max = row.length;
|
||||||
rowBuf.push(row);
|
rowBuf.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i in rowBuf) {
|
for (var i in rowBuf) {
|
||||||
res.write('<tr class="' + prefix + 'row">\n');
|
res.write('<tr class="' + prefix + 'row">\n');
|
||||||
for (var n=0; n<max; n+=1) {
|
for (var n=0; n<max; n+=1) {
|
||||||
|
@ -145,7 +145,7 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
||||||
}
|
}
|
||||||
res.write('</tr>\n');
|
res.write('</tr>\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
res.write('</table>\n');
|
res.write('</table>\n');
|
||||||
workbook.close();
|
workbook.close();
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview Fields and methods of the helma.Search class
|
* @fileoverview Fields and methods of the helma.Search class
|
||||||
* <br /><br />
|
* <br /><br />
|
||||||
* To use this optional module, its repository needs to be added to the
|
* To use this optional module, its repository needs to be added to the
|
||||||
* application, for example by calling app.addRepository('modules/helma/Search.js')
|
* application, for example by calling app.addRepository('modules/helma/Search.js')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// take care of any dependencies
|
// take care of any dependencies
|
||||||
app.addRepository('modules/helma/lucene-core.jar');
|
app.addRepository('modules/helma/lucene-core-2.2.0.jar');
|
||||||
app.addRepository('modules/helma/lucene-analyzers.jar');
|
app.addRepository('modules/helma/lucene-analyzers-2.2.0.jar');
|
||||||
|
|
||||||
|
|
||||||
if (!global.helma) {
|
if (!global.helma) {
|
||||||
|
@ -47,7 +47,7 @@ if (!global.helma) {
|
||||||
* creating a fulltext search index based on Apache Lucene.
|
* creating a fulltext search index based on Apache Lucene.
|
||||||
* @returns A newly created instance of this prototype.
|
* @returns A newly created instance of this prototype.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @author Robert Gaggl <robert@nomatic.org>
|
* @author Robert Gaggl <robert@nomatic.org>
|
||||||
*/
|
*/
|
||||||
helma.Search = function() {
|
helma.Search = function() {
|
||||||
try {
|
try {
|
||||||
|
@ -309,7 +309,7 @@ helma.Search.Index = function(directory, analyzer) {
|
||||||
this.getAnalyzer = function() {
|
this.getAnalyzer = function() {
|
||||||
return analyzer;
|
return analyzer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a searcher for querying this index.
|
* Returns a searcher for querying this index.
|
||||||
* @returns A searcher useable for querying the index.
|
* @returns A searcher useable for querying the index.
|
||||||
|
@ -318,7 +318,7 @@ helma.Search.Index = function(directory, analyzer) {
|
||||||
this.getSearcher = function() {
|
this.getSearcher = function() {
|
||||||
return new helma.Search.Searcher(this);
|
return new helma.Search.Searcher(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @ignore */
|
/** @ignore */
|
||||||
this.toString = function() {
|
this.toString = function() {
|
||||||
return ("[Lucene Index " + directory + "]");
|
return ("[Lucene Index " + directory + "]");
|
||||||
|
@ -773,7 +773,7 @@ helma.Search.HitCollection = function(hits) {
|
||||||
this.length = function() {
|
this.length = function() {
|
||||||
return this.size();
|
return this.size();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes a provided function once per hit.
|
* Executes a provided function once per hit.
|
||||||
* @param {Function} fun Function to execute for each element
|
* @param {Function} fun Function to execute for each element
|
||||||
|
@ -793,7 +793,7 @@ helma.Search.HitCollection = function(hits) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1308,7 +1308,7 @@ helma.Search.Document.Field = function(name, value, options) {
|
||||||
var store = pkg.Store.YES;
|
var store = pkg.Store.YES;
|
||||||
var index = pkg.Index.TOKENIZED;
|
var index = pkg.Index.TOKENIZED;
|
||||||
var termVector = pkg.TermVector.NO;
|
var termVector = pkg.TermVector.NO;
|
||||||
|
|
||||||
var opt;
|
var opt;
|
||||||
if (options != null) {
|
if (options != null) {
|
||||||
if (options.store != null) {
|
if (options.store != null) {
|
||||||
|
|
|
@ -18,20 +18,20 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview Fields and methods of the helma.Ssh class.
|
* @fileoverview Fields and methods of the helma.Ssh class.
|
||||||
* <br /><br />
|
* <br /><br />
|
||||||
* To use this optional module, its repository needs to be added to the
|
* To use this optional module, its repository needs to be added to the
|
||||||
* application, for example by calling app.addRepository('modules/helma/Ssh.js')
|
* application, for example by calling app.addRepository('modules/helma/Ssh.js')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// take care of any dependencies
|
// take care of any dependencies
|
||||||
app.addRepository('modules/helma/File.js');
|
app.addRepository('modules/helma/File.js');
|
||||||
app.addRepository('modules/helma/ganymed-ssh2.jar');
|
app.addRepository('modules/helma/ganymed-ssh2-build208.jar');
|
||||||
|
|
||||||
// define the helma namespace, if not existing
|
// define the helma namespace, if not existing
|
||||||
if (!global.helma) {
|
if (!global.helma) {
|
||||||
global.helma = {};
|
global.helma = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance of helma.Ssh
|
* Creates a new instance of helma.Ssh
|
||||||
* @class This class provides methods for connecting to a remote
|
* @class This class provides methods for connecting to a remote
|
||||||
* server via secure shell (ssh) and copying files from/to a remote
|
* server via secure shell (ssh) and copying files from/to a remote
|
||||||
|
@ -43,7 +43,7 @@ if (!global.helma) {
|
||||||
* file. This argument is optional.
|
* file. This argument is optional.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @returns A newly created instance of helma.Ssh
|
* @returns A newly created instance of helma.Ssh
|
||||||
* @author Robert Gaggl <robert@nomatic.org>
|
* @author Robert Gaggl <robert@nomatic.org>
|
||||||
*/
|
*/
|
||||||
helma.Ssh = function(server, hosts) {
|
helma.Ssh = function(server, hosts) {
|
||||||
var SSHPKG = Packages.ch.ethz.ssh2;
|
var SSHPKG = Packages.ch.ethz.ssh2;
|
||||||
|
@ -61,11 +61,11 @@ helma.Ssh = function(server, hosts) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof TypeError == false)
|
if (e instanceof TypeError == false)
|
||||||
throw(e);
|
throw(e);
|
||||||
throw("helma.Ssh needs " + SSHPKGNAME +
|
throw("helma.Ssh needs " + SSHPKGNAME +
|
||||||
" in lib/ext or application directory " +
|
" in lib/ext or application directory " +
|
||||||
"[" + SSHPKGURL + "]");
|
"[" + SSHPKGURL + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple verifier for verifying host keys
|
* A simple verifier for verifying host keys
|
||||||
* @private
|
* @private
|
||||||
|
@ -96,7 +96,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the argument into an instance of java.io.File
|
* Converts the argument into an instance of java.io.File
|
||||||
* @param {helma.File|java.io.File|String} file Either a file
|
* @param {helma.File|java.io.File|String} file Either a file
|
||||||
|
@ -131,7 +131,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private helper method for debugging output using app.logger
|
* Private helper method for debugging output using app.logger
|
||||||
* @param {String} methodName The name of the method
|
* @param {String} methodName The name of the method
|
||||||
|
@ -175,7 +175,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connects to a remote host using plain username/password authentication.
|
* Connects to a remote host using plain username/password authentication.
|
||||||
* @param {String} username The username
|
* @param {String} username The username
|
||||||
|
@ -217,7 +217,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnects this client from the remote server.
|
* Disconnects this client from the remote server.
|
||||||
*/
|
*/
|
||||||
|
@ -325,7 +325,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles paranoid mode. If set to true this client tries to
|
* Toggles paranoid mode. If set to true this client tries to
|
||||||
* verify the host key against the its list of known hosts
|
* verify the host key against the its list of known hosts
|
||||||
|
@ -346,7 +346,7 @@ helma.Ssh = function(server, hosts) {
|
||||||
this.isParanoid = function() {
|
this.isParanoid = function() {
|
||||||
return paranoid;
|
return paranoid;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* main constructor body
|
* main constructor body
|
||||||
*/
|
*/
|
||||||
|
|
11
modules/helma/build.gradle
Normal file
11
modules/helma/build.gradle
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
dependencies {
|
||||||
|
runtimeOnly 'ch.ethz.ganymed:ganymed-ssh2:build209'
|
||||||
|
runtimeOnly 'net.sourceforge.jexcelapi:jxl:2.5.7'
|
||||||
|
runtimeOnly 'org.apache.lucene:lucene-analyzers:2.2.0'
|
||||||
|
runtimeOnly 'org.apache.lucene:lucene-core:2.2.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
task deps(type: Copy) {
|
||||||
|
from sourceSets.main.runtimeClasspath
|
||||||
|
into '.'
|
||||||
|
}
|
BIN
modules/helma/jxl-2.5.7.jar
Normal file
BIN
modules/helma/jxl-2.5.7.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
14
modules/jala/build.gradle
Normal file
14
modules/jala/build.gradle
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
dependencies {
|
||||||
|
runtimeOnly 'dom4j:dom4j:1.6.1'
|
||||||
|
runtimeOnly 'jaxen:jaxen:1.1-beta-8'
|
||||||
|
runtimeOnly 'net.sf.javamusictag:jid3lib:0.5.4'
|
||||||
|
|
||||||
|
// FIXME: Did not find these two or appropriate replacements for them
|
||||||
|
//runtime 'id3:de.ueberdosis.mp3info:1.6.0d9'
|
||||||
|
//runtime 'javadns:org.wonderly:?'
|
||||||
|
}
|
||||||
|
|
||||||
|
task deps(type: Copy) {
|
||||||
|
from sourceSets.main.runtimeClasspath
|
||||||
|
into 'lib'
|
||||||
|
}
|
Binary file not shown.
9
modules/jala/util/HopKit/build.gradle
Normal file
9
modules/jala/util/HopKit/build.gradle
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
dependencies {
|
||||||
|
// FIXME: Seems to be not used, anymore…?
|
||||||
|
runtimeOnly 'bsf:bsf:2.4.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
task deps(type: Copy) {
|
||||||
|
from sourceSets.main.runtimeClasspath
|
||||||
|
into 'lib'
|
||||||
|
}
|
BIN
modules/jala/util/HopKit/lib/bsf-2.4.0.jar
Normal file
BIN
modules/jala/util/HopKit/lib/bsf-2.4.0.jar
Normal file
Binary file not shown.
Binary file not shown.
9
modules/jala/util/Test/build.gradle
Normal file
9
modules/jala/util/Test/build.gradle
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
dependencies {
|
||||||
|
runtimeOnly 'org.subethamail:subethasmtp-smtp:1.2'
|
||||||
|
runtimeOnly 'org.subethamail:subethasmtp-wiser:1.2'
|
||||||
|
}
|
||||||
|
|
||||||
|
task deps(type: Copy) {
|
||||||
|
from sourceSets.main.runtimeClasspath
|
||||||
|
into 'code'
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
BIN
modules/jala/util/Test/code/subethasmtp-wiser-1.2.jar
Normal file
BIN
modules/jala/util/Test/code/subethasmtp-wiser-1.2.jar
Normal file
Binary file not shown.
|
@ -7,3 +7,7 @@ org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.git/**')
|
||||||
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore')
|
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore')
|
||||||
|
|
||||||
include 'launcher'
|
include 'launcher'
|
||||||
|
include 'modules:helma'
|
||||||
|
include 'modules:jala'
|
||||||
|
include 'modules:jala:util:HopKit'
|
||||||
|
include 'modules:jala:util:Test'
|
||||||
|
|
66
src/dist/extras/upstart/helma
vendored
66
src/dist/extras/upstart/helma
vendored
|
@ -6,56 +6,67 @@
|
||||||
# andreas bolka, 2003-11-30
|
# andreas bolka, 2003-11-30
|
||||||
#
|
#
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: helma
|
||||||
|
# Required-Start: postgresql apache2
|
||||||
|
# Required-Stop:
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-STop: 0 1 6
|
||||||
|
# Short-Description: Helma Application Server
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
HELMA_CONFIG=/etc/helma.conf
|
HELMA_CONFIG=/etc/helma.conf
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
# Check for existence of needed config file and source it
|
# Check for existence of needed config file and source it
|
||||||
if [ -r $HELMA_CONFIG ]; then
|
if [ -r $HELMA_CONFIG ]; then
|
||||||
source $HELMA_CONFIG
|
source $HELMA_CONFIG
|
||||||
else
|
else
|
||||||
echo "Can't read config file $HELMA_CONFIG"
|
echo "Can't read config file $HELMA_CONFIG"
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for missing files and directories
|
# Check for missing files and directories
|
||||||
|
|
||||||
if [ ! -x $JAVA_BIN ]; then
|
if [ ! -x $JAVA_BIN ]; then
|
||||||
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
|
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
|
||||||
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
|
|
||||||
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
if [ ! -d $HELMA_HOME ]; then
|
|
||||||
echo "Config error: HELMA_HOME $HELMA_HOME not found"
|
|
||||||
exit 5
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# local settins
|
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
|
||||||
RUN_CMD="sudo -u $HELMA_USER $JAVA_BIN"
|
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
|
||||||
RUN_ARGS="$JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $HELMA_HOME ]; then
|
||||||
|
echo "Config error: HELMA_HOME $HELMA_HOME not found"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
RUN_CMD="su - $HELMA_USER"
|
||||||
|
RUN_ARGS="-c $JAVA_BIN $JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $HELMA_SERVICE: "
|
echo -n "Starting $HELMA_SERVICE: "
|
||||||
|
|
||||||
if [ -f $HELMA_PID ]; then
|
if [ -f $HELMA_PID ]; then
|
||||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) already running"
|
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) already running"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $HELMA_HOME
|
cd $HELMA_HOME
|
||||||
nohup $RUN_CMD $RUN_ARGS > $HELMA_LOG 2>&1 &
|
nohup $RUN_CMD "$RUN_ARGS" > $HELMA_LOG 2>&1 &
|
||||||
echo $! > $HELMA_PID
|
echo $! > $HELMA_PID
|
||||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started."
|
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down $HELMA_SERVICE: "
|
echo -n "Shutting down $HELMA_SERVICE: "
|
||||||
if [ ! -f $HELMA_PID ]; then
|
if [ ! -f $HELMA_PID ]; then
|
||||||
echo "$HELMA_SERVICE not running"
|
echo "$HELMA_SERVICE not running"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PID=`cat $HELMA_PID 2>/dev/null`
|
PID=`cat $HELMA_PID 2>/dev/null`
|
||||||
|
@ -65,20 +76,21 @@ stop)
|
||||||
echo "stopped."
|
echo "stopped."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart)
|
restart)
|
||||||
$0 stop && $0 start
|
$0 stop && $0 start
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reload)
|
reload)
|
||||||
echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE"
|
echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE"
|
||||||
touch $HELMA_HOME/server.properties
|
touch $HELMA_HOME/server.properties
|
||||||
touch $HELMA_HOME/apps.properties
|
touch $HELMA_HOME/apps.properties
|
||||||
echo "."
|
echo "."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/helma start|stop|restart|reload"
|
echo "Usage: /etc/init.d/helma start|stop|restart|reload"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
92
src/dist/extras/upstart/helma.conf
vendored
92
src/dist/extras/upstart/helma.conf
vendored
|
@ -1,72 +1,44 @@
|
||||||
##############################################################
|
#
|
||||||
###
|
# Helma Object Publisher configuration file
|
||||||
### Helma object publisher config file
|
#
|
||||||
### Author: Hannes Wallnoefer, <hannes@helma.at>
|
# Authors:
|
||||||
### Author: Andreas Bolka
|
# Hannes Wallnoefer <hannes@helma.at>,
|
||||||
###
|
# Andreas Bolka
|
||||||
### This file should be placed in /etc/helma.conf.
|
#
|
||||||
### It is read by the Helma service control script,
|
# This file should be placed in /etc/helma.conf.
|
||||||
### usually /etc/init.d/helma.
|
# It is read by the Helma service control script,
|
||||||
###
|
# usually /etc/init.d/helma.
|
||||||
##############################################################
|
#
|
||||||
|
|
||||||
##############################################################
|
# Full path to Java executable
|
||||||
### The name of this Helma server/service and the
|
JAVA_HOME=/usr/lib/jvm/default-java
|
||||||
### pid file to be used
|
JAVA_BIN=$JAVA_HOME/bin/java
|
||||||
#############################################################
|
|
||||||
|
# Options passed to the Java runtime
|
||||||
|
JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djsse.enableSNIExtension=false"
|
||||||
|
|
||||||
|
# The name of this Helma server/service and the pid file to be used
|
||||||
HELMA_SERVICE=helma
|
HELMA_SERVICE=helma
|
||||||
HELMA_PID=/var/run/helma.pid
|
HELMA_PID=/var/run/helma.pid
|
||||||
|
|
||||||
|
# Helma install directory. This is where we look for the Helma jar files
|
||||||
|
# (launcher.jar, lib/* and lib/ext/*)
|
||||||
|
HELMA_INSTALL=/home/helma
|
||||||
|
|
||||||
##############################################################
|
# Helma home directory, in case it is different from the Helma install dir.
|
||||||
### Full path to Java executable
|
# This is where Helma will look for properties files and applications.
|
||||||
##############################################################
|
|
||||||
JAVA_HOME=/usr/lib/j2sdk1.5-sun
|
|
||||||
JAVA_BIN=$JAVA_HOME/bin/java
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
### Options passed to the Java runtime
|
|
||||||
##############################################################
|
|
||||||
JAVA_OPTS="-Djava.awt.headless=true"
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
### Helma install directory. This is where we look for
|
|
||||||
### the Helma jar files (launcher.jar, lib/* and lib/ext/*)
|
|
||||||
##############################################################
|
|
||||||
HELMA_INSTALL=/usr/local/helma/helma-1.6.x
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
### Helma home directory, in case it is different from the
|
|
||||||
### Helma install dir. This is where Helma will look for
|
|
||||||
### properties files and applications.
|
|
||||||
##############################################################
|
|
||||||
HELMA_HOME=$HELMA_INSTALL
|
HELMA_HOME=$HELMA_INSTALL
|
||||||
|
|
||||||
|
# The user Helma should be running as
|
||||||
##############################################################
|
|
||||||
### The user Helma should be running as
|
|
||||||
##############################################################
|
|
||||||
HELMA_USER=helma
|
HELMA_USER=helma
|
||||||
|
|
||||||
|
# File to which standard and error output from Helma is redirected
|
||||||
##############################################################
|
|
||||||
### File to which standard and error output from Helma
|
|
||||||
### is redirected
|
|
||||||
##############################################################
|
|
||||||
HELMA_LOG=$HELMA_HOME/log/helma-out.log
|
HELMA_LOG=$HELMA_HOME/log/helma-out.log
|
||||||
|
|
||||||
|
# Helma options. Possible options are:
|
||||||
##############################################################
|
# -f file - Location of server.properties file
|
||||||
### Helma options. Possible options are:
|
# -p port - RMI port
|
||||||
###
|
# -w port - Web server port
|
||||||
### -f file Specify server.properties file
|
# -x port - XML-RPC port
|
||||||
### -p port Specify RMI port number
|
# -jk port - AJP13 port
|
||||||
### -w port Specify port number for embedded Web server
|
|
||||||
### -x port Specify XML-RPC port number
|
|
||||||
### -jk port Specify AJP13 port number
|
|
||||||
###
|
|
||||||
##############################################################
|
|
||||||
HELMA_ARGS="-w 8080"
|
HELMA_ARGS="-w 8080"
|
||||||
|
|
Loading…
Add table
Reference in a new issue