Reference9:Concept Linux Application

From innovaphone wiki
Revision as of 12:12, 6 April 2011 by Smayoral (talk | contribs)
Jump to navigation Jump to search
There are also other versions of this article available: Reference9 (this version) | Reference10

Introduction

Applications like innovaphone reporting can be developed for the linux application platform.

Requirements

It is needed to have the linux application platform installed and running.

Installation

You can install new applications or just update them here.

Requirements

The installation/update file must be a .tar.gz file with a name beginning with install like install_helloWorld.tar.gz. Inside this compressed file must exist at top-level only one script with a name beginning with install and with any executable extension (sh, pl, py, out), like install_helloWorld.sh. It is of course allowed to have other install scripts inside folders or another script at top-level but beginning with another name.

Application XML

If you want to manage your application through the linux application platform you need to provide an XML file with the name helloWorld.xml and copy it to the following location: /var/www/innovaphone/apps/ (more information about the web server here).

This would be an example of a possible helloWorld.xml file:

<?xml version="1.0" encoding="utf-8"?>
<application>
    <name>hello World!</name>
    <desc>Test application</desc>
    <version>1.0</version>
    <directory>hello_world</directory>
    <href>helloWorld.php</href>
    <linux-username>hello-world</linux-username>
    <packages>
        <package></package>
    </packages>
    <database name="hello-world" username="hello-world"/>
    <cronjob username="www-data" script="hello_world.sh"/>
    <log-files>
        <log title="Hello World">/var/www/innovaphone/apps/hello-world/logs/helloWorld.log</log>
        <log title="Application log">/var/log/my_application.log</log>
    </log-files>
    <config-files>
        <conf>/var/www/innovaphone/apps/hello-world/conf/helloWorld.conf</conf>
    </config-files>
    <backup>
        <command title="Save hello World configuration files" cmd="savehello-worldcfgs" script=""/>
        <command title="Save hello World database" cmd="savehello-worlddb" script=""/>
        <command title="Save hello World log files" cmd="savehello-worldlogs" script=""/>
        <command title="Application dependant command" cmd="my_backup" script="my_backup.sh"/>
    </backup>
    <restore>
        <command title="Restore hello World configuration files" cmd="restorehello-worldcfgs" script=""/>
        <command title="Restore hello World database" cmd="restorehello-worlddb" script="">
            <action>/etc/init.d/postgresql restart</action>
        </command> 
    </restore>
    <uninstall/>
</application>