* INITIAL POPULATIONS OF THIS REPO
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.fourelementscapital</groupId>
|
||||
<artifactId>iMonitorClient</artifactId>
|
||||
<version>2.0</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>iMonitorClient</name>
|
||||
<url>http://www.fourelementscapital.com</url>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>com.fourelementscapital.imonitor.App</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fourelementscapital</groupId>
|
||||
<artifactId>lib-socket</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
|
||||
* All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
package com.fourelementscapital.imonitor;
|
||||
|
||||
import com.fourelementscapital.socket.SocketClient;
|
||||
|
||||
/**
|
||||
* A com.fourelementscapital Class
|
||||
*/
|
||||
public class App {
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
try {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("theme$#=computing,java");
|
||||
sb.append("~subject$#=This is just a test");
|
||||
sb.append("~body$#=This is {{{IMG}}} the email body");
|
||||
sb.append("~recipients$#=ari@4ecap.com");
|
||||
//sb.append("~recipients$#=surya@kronosinvestments.net,ari@4ecap.com");
|
||||
//sb.append("~emailAttachments$#=C:\\Ari\\_tmp\\test_email\\1.txt,C:\\Ari\\_tmp\\test_email\\2.txt");
|
||||
//sb.append("~emailImages$#=C:\\Users\\Public\\Pictures\\Sample Pictures\\Lighthouse.jpg");
|
||||
sb.append("~sayIt$#=true");
|
||||
sb.append("~emailIt$#=false");
|
||||
sb.append("~phoneCall$#=false");
|
||||
sb.append("~sms$#=FALSE");
|
||||
sb.append("~ym$#=FALSE");
|
||||
sb.append("~numbers$#=+65 8297 1508");
|
||||
//sb.append("~numbers$#=+6587825779899");
|
||||
sb.append("~alarmLevel$#=LOW");
|
||||
sb.append("<EOF>");
|
||||
|
||||
String message = sb.toString();
|
||||
|
||||
for (int i=0; i<1; i++) {
|
||||
SocketClient.sendMessage(message);
|
||||
}
|
||||
|
||||
System.out.println("Message is sent to socket server ");
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
socket_server_address=127.0.0.1
|
||||
#socket_server_address=10.153.64.10
|
||||
#socket_server_port_number=1777
|
||||
socket_server_port_number=1778
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="CONSOLE" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%4p %d{HH:mm:ss,SSS} %C - %m%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="ERROR">
|
||||
<AppenderRef ref="CONSOLE"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
|
||||
* All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
package com.fourelementscapital.imonitor;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for App
|
||||
*/
|
||||
public class AppTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty Test
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
+68
@@ -0,0 +1,68 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.fourelementscapital</groupId>
|
||||
<artifactId>iMonitorServer</artifactId>
|
||||
<version>2.0</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>iMonitorServer</name>
|
||||
<url>http://www.fourelementscapital.com</url>
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>com.fourelementscapital.imonitor.App</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<targetPath>${project.build.directory}</targetPath>
|
||||
<includes>
|
||||
<include>ThemeEmails.xlsx</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
<targetPath>${project.build.directory}/classes</targetPath>
|
||||
<includes>
|
||||
<include>*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fourelementscapital</groupId>
|
||||
<artifactId>lib-imonitor</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
|
||||
* All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
package com.fourelementscapital.imonitor;
|
||||
|
||||
import com.fourelementscapital.socket.SocketServer;
|
||||
|
||||
/**
|
||||
* A com.fourelementscapital Class
|
||||
*/
|
||||
public class App {
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
IMonitorSocketProcess iMonitorSocketProcess = new IMonitorSocketProcess();
|
||||
try {
|
||||
SocketServer.listen(iMonitorSocketProcess);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
mail.smtp.auth=true
|
||||
mail.smtp.starttls.enable=true
|
||||
mail.smtp.host=smtp.gmail.com
|
||||
mail.smtp.port=587
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
excel_file=/iMonitor2/ThemeEmails.xlsx
|
||||
#excel_file=C:\\iMonitor2\\ThemeEmails.xlsx
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#socket_server_address=localhost
|
||||
#socket_server_address=10.153.64.10
|
||||
#socket_server_address=10.153.64.4
|
||||
#socket_server_port_number=1777
|
||||
socket_server_port_number=1778
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#database_infrastructure_connstring=jdbc:mysql://10.153.64.10:3306/infrastructure2?user=root&password=disaster
|
||||
#database_infrastructure_driver=com.mysql.jdbc.Driver
|
||||
|
||||
database_infrastructure_connstring=jdbc:mysql://192.168.1.98:3306/infrastructure?user=root&password=FOUR2008
|
||||
database_infrastructure_driver=com.mysql.jdbc.Driver
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#mbrola_path=C:\\iMonitor2\\mbrola\\
|
||||
mbrola_path=/usr/share/mbrola
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="CONSOLE" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%4p %d{HH:mm:ss,SSS} %C - %m%n" />
|
||||
</Console>
|
||||
<File name="FILE" fileName="/iMonitor2/socket_server.log">
|
||||
<PatternLayout pattern="%4p %d{HH:mm:ss,SSS} %C - %m%n" />
|
||||
</File>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="DEBUG">
|
||||
<AppenderRef ref="CONSOLE"/>
|
||||
<AppenderRef ref="FILE"/>
|
||||
</Root>
|
||||
<Logger name="log4j.logger.marytts" level="ERROR" additivity="false">
|
||||
<Appender-ref ref="FILE" />
|
||||
</Logger>
|
||||
<Logger name="log4j.logger.de.dfki" level="ERROR" additivity="false">
|
||||
<Appender-ref ref="FILE" />
|
||||
</Logger>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
|
||||
* All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
package com.fourelementscapital.imonitor;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for App
|
||||
*/
|
||||
public class AppTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty Test
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
SERVICE_NAME="I-Monitor Server"
|
||||
PATH_TO_JAR="/tmp2/iMonitorServer-1.0-jar-with-dependencies.jar"
|
||||
PID_PATH_NAME="/tmp2/iMonitorService-pid"
|
||||
PID_PS="$(ps ax |grep 'iMonitorServer-' |grep java |awk '{print $1}')"
|
||||
case $1 in
|
||||
start)
|
||||
echo "Starting $SERVICE_NAME ..."
|
||||
if [ ! -f $PID_PATH_NAME ] || [ -z $PID_PS ]; then
|
||||
#nohup java -jar $PATH_TO_JAR > /dev/null 2>&1 & echo $! > $PID_PATH_NAME
|
||||
nohup java -jar $PATH_TO_JAR > /dev/null 2>&1 &
|
||||
#nohup java -jar $PATH_TO_JAR & > /dev/null 2>&1
|
||||
echo $! > $PID_PATH_NAME;
|
||||
echo "$SERVICE_NAME Started ...";
|
||||
else
|
||||
echo "$SERVICE_NAME is already running! ..."
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ -n "$PID_PS" ]; then
|
||||
#PID=$(cat $PID_PATH_NAME);
|
||||
echo "Stopping $SERVICE_NAME ..."
|
||||
kill -9 $PID_PS >/dev/null 2>&1;
|
||||
echo "$SERVICE_NAME Stopped! ..."
|
||||
rm -f $PID_PATH_NAME > /dev/null 2>&1
|
||||
else
|
||||
echo "$SERVICE_NAME is not running ..."
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if [ -n "$PID_PS" ]; then
|
||||
echo "$SERVICE_NAME is Running ... PID: $PID_PS"
|
||||
else
|
||||
echo "$SERVICE_NAME is not running ..."
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
if [ -f $PID_PATH_NAME ] || [ -n $PID_PS ]; then
|
||||
#PID=$(cat $PID_PATH_NAME);
|
||||
echo "Stopping $SERVICE_NAME ...";
|
||||
kill -9 $PID_PS >/dev/null 2>&1;
|
||||
echo "$SERVICE_NAME stopped! ...";
|
||||
rm -f $PID_PATH_NAME > /dev/null 2>&1
|
||||
echo "Starting $SERVICE_NAME ..."
|
||||
nohup java -jar $PATH_TO_JAR > /dev/null 2>&1 &
|
||||
echo $! > $PID_PATH_NAME;
|
||||
echo "$SERVICE_NAME Started! ..."
|
||||
else
|
||||
echo "$SERVICE_NAME is not running ..."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user