code:
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.ops4j.pax.web-4.3.0" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">

    <feature name="pax-jetty" description="Provide Jetty engine support" version="9.2.19.v20160908">
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
        <bundle dependency="true" start-level="30">mvn:javax.mail/mail/1.4.4</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
		<bundle dependency="true" start-level="30">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.ow2.asm/asm-all/5.0.2</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.aries/org.apache.aries.util/1.1.0</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-continuation/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-http/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-io/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-jaspi/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-jmx/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-jndi/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-plus/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-rewrite/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-security/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-server/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-servlet/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-servlets/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-util/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-util-ajax/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-webapp/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-jaas/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-xml/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-server/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-client/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-common/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-servlet/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-api/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:javax.websocket/javax.websocket-api/1.1</bundle>

        <capability>
            pax.http.provider;provider:=jetty
        </capability>
    </feature>

    <feature name="pax-jetty-spdy" version="4.3.0" description="Optional additional feature to run Jetty with SPDY">
    	<details>
    		Please beware, for this feature to run properly you'll need to add the alpn-boot.jar to the
    		lib/ext folder of Karaf in some cases of your JVM.

    		make sure you have the following jar from it's maven coordinate installed:

    		mvn:org.mortbay.jetty.alpn/alpn-boot/8.1.2.v20141202 (and yes version 8.x is intentional there is no newer version available)

    	</details>
        <feature version="[7.0,10.0)">pax-jetty</feature>
		<bundle dependency="true" start-level="1">mvn:org.eclipse.jetty.osgi/jetty-osgi-alpn/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.spdy/spdy-server/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.spdy/spdy-core/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.spdy/spdy-client/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.spdy/spdy-http-server/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty.spdy/spdy-http-common/9.2.19.v20160908</bundle>
        <bundle start-level="30">mvn:org.eclipse.jetty/jetty-client/9.2.19.v20160908</bundle>
    </feature>

    <feature name="pax-http-jetty" version="4.3.0">
        <configfile finalname="/etc/jetty.xml">mvn:org.ops4j.pax.web/pax-web-features/4.3.0/xml/jettyconfig</configfile>
        <config name="org.ops4j.pax.web">
            org.osgi.service.http.port=8181
            javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
            org.ops4j.pax.web.config.file=${karaf.base}/etc/jetty.xml
        </config>
        <feature version="[7.0,10.0)">pax-jetty</feature>

        <bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm-all/5.0.2</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-bundleutils/4.1</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-reflect/4.1</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-finder/4.1</bundle>

        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-api/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-spi/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jetty/4.3.0</bundle>
    </feature>

    <feature name="pax-http" version="4.3.0" description="Implementation of the OSGI HTTP Service">
        <details>Allows to publish servlets using pax web and jetty</details>
        <feature dependency="true" version="[4.3,4.4)">pax-http-jetty</feature>
        <requirement>
            pax.http.provider
        </requirement>
    </feature>

    <feature name="pax-http-whiteboard" description="Provide HTTP Whiteboard pattern support" version="4.3.0">
        <feature version="[4.3,4.4)">pax-http</feature>
        <bundle dependency="true" start-level="30">mvn:org.eclipse.jdt.core.compiler/ecj/4.4</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jsp/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/4.3.0</bundle>
    </feature>

    <feature name="pax-war" description="Provide support of a full WebContainer" version="4.3.0">
        <config name="org.ops4j.pax.url.war">
            org.ops4j.pax.url.war.importPaxLoggingPackages=true
        </config>
        <feature version="[4.3,4.4)">pax-http-whiteboard</feature>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jsp/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-extender-war/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-deployer/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.url/pax-url-war/2.4.7/jar/uber</bundle>
    </feature>

    <feature name="pax-http-tomcat" description="Provide Tomcat support" version="4.3.0">
        <config name="org.ops4j.pax.url.war">
            org.ops4j.pax.url.war.importPaxLoggingPackages=true
        </config>
        <config name="org.ops4j.pax.web">
            org.osgi.service.http.port=8181
            javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
        </config>
        <feature>scr</feature>
        <feature version="[4.3,4.4)">pax-http</feature>
        <bundle dependency="true" start-level="30">mvn:javax.el/javax.el-api/3.0.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core/8.0.14.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-websocket/8.0.14.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-logging-juli/8.0.14.1</bundle>
        <bundle dependency="true" start-level="30">mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-atinject_1.0_spec/1.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-1.0.0/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/1.3.9_1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.java-persistence-api-2.0/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.javamail-api-1.4/2.5.0</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-stax-api_1.2_spec/1.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-ejb_3.1_spec/1.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-osgi-registry/1.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jaxws_2.2_spec/1.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jaxrpc_1.1_spec/2.1</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.5.0</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.3/2.5.0</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.geronimo.specs/geronimo-annotation_1.1_spec/1.0.1</bundle>
        <bundle dependency="true" start-level="30">mvn:javax.websocket/javax.websocket-api/1.1</bundle>

        <bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm-all/5.0.2</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-bundleutils/4.1</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-reflect/4.1</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.xbean/xbean-finder/4.1</bundle>

        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-api/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-spi/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-runtime/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat/4.3.0</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jsp/4.3.0</bundle>

        <capability>
            pax.http.provider;provider:=tomcat
        </capability>
    </feature>

    <feature name="pax-war-tomcat" version="4.3.0">
        <feature version="[4.3,4.4)">pax-http-tomcat</feature>
        <feature version="[4.3,4.4)">pax-war</feature>
    </feature>

    <feature name="pax-jsf-support" version="4.3.0">
        <feature version="[4.3,4.4)">pax-war</feature>
        <feature>pax-cdi-web-openwebbeans</feature>
        <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr250-1.0/2.5.0</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-1.0.0/2.5.0</bundle>
        <bundle dependency="true">mvn:commons-beanutils/commons-beanutils/1.8.3</bundle>
        <bundle dependency="true">mvn:commons-collections/commons-collections/3.2.1</bundle>
        <bundle dependency="true">mvn:commons-codec/commons-codec/1.8</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-digester/1.8_4</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.bundles/commons-discovery/0.4_1</bundle>
        <bundle>mvn:org.apache.myfaces.core/myfaces-api/2.2.6</bundle>
        <bundle>mvn:org.apache.myfaces.core/myfaces-impl/2.2.6</bundle>
    </feature>

</features>


code:
<?xml version="1.0"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">

    <!-- =========================================================== -->
    <!-- Set connectors -->
    <!-- =========================================================== -->
    <!-- One of each type! -->
    <!-- =========================================================== -->

    <!-- Use this connector for many frequently idle connections and for
        threadless continuations. -->
	<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
		<Set name="secureScheme">https</Set>
		<Set name="securePort">
			<Property name="jetty.secure.port" default="8443" />
		</Set>
		<Set name="outputBufferSize">32768</Set>
		<Set name="requestHeaderSize">8192</Set>
		<Set name="responseHeaderSize">8192</Set>
		<Set name="sendServerVersion">true</Set>
		<Set name="sendDateHeader">false</Set>
		<Set name="headerCacheSize">512</Set>
	</New>

	<!-- =========================================================== -->
    <!-- Special server connectors -->
    <!-- =========================================================== -->
    <!-- This is a sample for alternative connectors, enable if needed -->
    <!-- =========================================================== -->
    <!--
	<Call name="addConnector">
		<Arg>
			<New class="org.eclipse.jetty.server.ServerConnector">
				<Arg name="server">
					<Ref refid="Server" />
				</Arg>
				<Arg name="factories">
					<Array type="org.eclipse.jetty.server.ConnectionFactory">
						<Item>
							<New class="org.eclipse.jetty.server.HttpConnectionFactory">
								<Arg name="config">
									<Ref refid="httpConfig" />
								</Arg>
							</New>
						</Item>
					</Array>
				</Arg>
				<Set name="host">
					<Property name="jetty.host" default="localhost" />
				</Set>
				<Set name="port">
					<Property name="jetty.port" default="8282" />
				</Set>
				<Set name="idleTimeout">
					<Property name="http.timeout" default="30000" />
				</Set>
				<Set name="name">jettyConn1</Set>
			</New>
		</Arg>
	</Call>
 	-->

    <!-- =========================================================== -->
    <!-- Configure Authentication Realms -->
    <!-- Realms may be configured for the entire server here, or -->
    <!-- they can be configured for a specific web app in a context -->
    <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
    <!-- example). -->
    <!-- =========================================================== -->
    <Call name="addBean">
        <Arg>
            <New class="org.eclipse.jetty.jaas.JAASLoginService">
                <Set name="name">karaf</Set>
                <Set name="loginModuleName">karaf</Set>
                <Set name="roleClassNames">
                    <Array type="java.lang.String">
                        <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
                        </Item>
                    </Array>
                </Set>
            </New>
        </Arg>
    </Call>
    <Call name="addBean">
        <Arg>
            <New class="org.eclipse.jetty.jaas.JAASLoginService">
                <Set name="name">default</Set>
                <Set name="loginModuleName">karaf</Set>
                <Set name="roleClassNames">
                    <Array type="java.lang.String">
                        <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
                        </Item>
                    </Array>
                </Set>
            </New>
        </Arg>
    </Call>

</Configure>

repo_name: milisarge/lider

license: unknown


code:
# Plugin definition
plugin.name = antivirus
plugin.version = 1.1
plugin.description = Lider Ahenk antivirus plugin
plugin.machine.oriented = false
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = backup
plugin.version = 1.1
plugin.description = Lider Backup Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = browser
plugin.version = 1.1
plugin.description = Lider Browser Plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
#********************************************************************
# Lider Common Properties
#********************************************************************
# Use either language (tr, en etc.) or language tag (tr-TR, en_US) that conforms to the IETF BCP 47 standard.
lider.locale = tr

#********************************************************************
# LDAP Client Properties
#********************************************************************
ldap.server = ldap.mys.pardus.org.tr
ldap.port = 389
ldap.username = cn=admin,dc=mys,dc=pardus,dc=org
ldap.password = secret
ldap.root.dn = dc=mys,dc=pardus,dc=org
ldap.use.ssl = false
# NOTE: Allow self-signed certificates only for test/debug purposes!
ldap.allow.self.signed.cert = false
ldap.search.attributes = cn,objectClass,uid,liderPrivilege
ldap.mail.notifier.attributes = cn, mail, departmentNumber, uid
ldap.email.attribute = mail

#********************************************************************
# XMPP Client Properties
#********************************************************************
xmpp.host = im.mys.pardus.org.tr
xmpp.port = 5222
xmpp.username = lider_sunucu
xmpp.password = asddsa123
xmpp.resource = Smack
xmpp.service.name = im.mys.pardus.org.tr
xmpp.max.retry.connection.count = 5
xmpp.packet.replay.timeout = 10000
xmpp.ping.timeout = 300
# Please refer to
# https://github.com/Pardus-Kurumsal/lider/wiki/07.-SSL-Configuration
# for SSL configuration
xmpp.use.ssl = false
# NOTE: Allow self-signed certificates only for test/debug purposes!
xmpp.allow.self.signed.cert = false
xmpp.use.custom.ssl = false
xmpp.presence.priority = 1

#********************************************************************
# LDAP Agent Properties
#********************************************************************
agent.ldap.base.dn = ou=Ahenkler,dc=mys,dc=pardus,dc=org
agent.ldap.id.attribute = cn
agent.ldap.jid.attribute = uid
agent.ldap.object.classes = pardusDevice,device

#********************************************************************
# LDAP User Properties
#********************************************************************
user.ldap.base.dn = dc=mys,dc=pardus,dc=org
user.ldap.uid.attribute = uid
user.ldap.privilege.attribute = liderPrivilege
user.ldap.object.classes = pardusAccount,pardusLider
user.authorization.enabled = true
group.ldap.object.classes = groupOfNames

#********************************************************************
# Task Manager Properties
#********************************************************************
# If enabled, Lider checks future tasks (tasks with activation date)
# periodically
taskmanager.check.future.task = true
# Time in milliseconds between successive future task checks
taskmanager.future.task.check.period = 60000

#********************************************************************
# Alarm Properties
#********************************************************************
# If enabled, Lider checks reports with an alarm periodically
alarm.check.report = true

#********************************************************************
# Mail Properties
#********************************************************************
mail.address=liderahenk@gmail.com
# NOTE: Do not forget to change password!
mail.password = !P@ssw0Rd
mail.host = smtp.gmail.com
mail.smtp.port = 587
mail.smtp.auth = true
mail.smtp.starttls.enable = true
mail.smtp.ssl.enable = false
mail.smtp.connectiontimeout = 1000
mail.smtp.timeout = 1000
mail.smtp.writetimeout = 1000

# If enabled, Lider check task completion periodically
# and if any task is finished/completed, it sends a summary mail
mail.send.on.task.completion = true
# Time in milliseconds between successive task completion checks
mail.check.task.completion.period = 60000

# If enabled, Lider check policy completion periodically
# and if any policy is applied/completed, it sends a summary mail
mail.send.on.policy.completion = true
# Time in milliseconds between successive task completion checks
mail.check.policy.completion.period = 120000

#********************************************************************
# Hot Deployment Properties
#********************************************************************
hot.deployment.path=/opt/lider-server/deploy/

#********************************************************************
# File Transfer Properties
#********************************************************************
# Possible values: http, ssh
file.server.protocol = ssh
file.server.host = liderahenk.org
file.server.port = 22
file.server.username = distro
file.server.password = !Distr0
file.server.plugin.path = /plugins/ahenk-{0}_{1}_amd64.deb
file.server.agreement.path = /sample-agreement.txt
file.server.agent.file.path = /agent-files/{0}/

#********************************************************************
# cron string will be manipulate for defined tasks..
#********************************************************************
cron.task.list = BACKUP_WITH_MONITORING_TASK, SERVICE_MANAGEMENT
entry.size.limit = 20
cron.interval.entry.size = 10


code:
# Plugin info
plugin.name = conky
plugin.version = 1.1
plugin.description = Lider Conky Plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Database configuration
db.server = db.mys.pardus.org.tr:3306
db.database = liderdb
db.username = root
db.password = qwert123


code:
# Plugin definition
plugin.name = disk-limit
plugin.version = 1.1
plugin.description = Lider Ahenk disk-limit plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = disk-quota
plugin.version = 1.1
plugin.description = Lider Disk Quota Plugin
plugin.machine.oriented = false
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="lider-features-1.1">
    <feature name="lider" description="Lider Ahenk Karaf Features" version="1.1.0">
        Lider Ahenk Client Management System
        <feature prerequisite="false" dependency="false">lider-dependent-bundles</feature>
        <feature prerequisite="false" dependency="false">lider-core-bundles</feature>
        <feature prerequisite="false" dependency="false">lider-plugin-bundles</feature>
    </feature>
    <feature name="lider-core-bundles" description="Lider Ahenk Karaf Features" version="1.1.0">
        LiderAhenk client management system test feature for
			deploying without dependencies (for auto dependency resolve)

        <configfile finalname="/etc/tr.org.liderahenk.cfg">mvn:tr.org.liderahenk/lider-config/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.datasource.cfg">mvn:tr.org.liderahenk/lider-datasource-mariadb/1.1/cfg</configfile>
        <bundle start-level="80">mvn:tr.org.liderahenk/lider-core/1.1</bundle>
        <bundle start-level="80">mvn:tr.org.liderahenk/lider-localization/1.1</bundle>
        <bundle start-level="81">mvn:tr.org.liderahenk/lider-config/1.1</bundle>
        <bundle start-level="82">mvn:tr.org.liderahenk/lider-datasource-mariadb/1.1</bundle>
        <bundle start-level="83">mvn:tr.org.liderahenk/lider-persistence-mariadb/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-web/1.1/war</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-cache-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-ldap-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-log-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-authorization-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-messaging-xmpp/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-rest-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-router-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-service-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-taskmanager-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-pluginmanager-impl/1.1</bundle>
        <bundle start-level="84">mvn:tr.org.liderahenk/lider-policymanager-impl/1.1</bundle>
        <bundle start-level="85">mvn:tr.org.liderahenk/lider-mail-notification/1.1</bundle>
        <bundle start-level="86">mvn:tr.org.liderahenk/lider-report-impl/1.1</bundle>
        <bundle start-level="86">mvn:tr.org.liderahenk/lider-deployer/1.1</bundle>
    </feature>
    <feature name="lider-plugin-bundles" description="Lider Ahenk Karaf Features" version="1.1.0">
        <configfile finalname="/etc/tr.org.liderahenk.remote.access.cfg" override="true">mvn:tr.org.liderahenk/lider-remote-access/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.packagemanager.cfg" override="true">mvn:tr.org.liderahenk/lider-package-manager/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.resourceusage.cfg" override="true">mvn:tr.org.liderahenk/lider-resource-usage/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.disk.quota.cfg" override="true">mvn:tr.org.liderahenk/lider-disk-quota/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.conky.cfg" override="true">mvn:tr.org.liderahenk/lider-conky/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.browser.cfg" override="true">mvn:tr.org.liderahenk/lider-browser/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.backup.cfg" override="true">mvn:tr.org.liderahenk/lider-backup/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.loginmanager.cfg" override="true">mvn:tr.org.liderahenk/lider-login-manager/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.network.inventory.cfg" override="true">mvn:tr.org.liderahenk/lider-network-inventory/1.1/cfg
		</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.rsyslog.cfg" override="true">mvn:tr.org.liderahenk/lider-rsyslog/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.screensaver.cfg" override="true">mvn:tr.org.liderahenk/lider-screensaver/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.screenshot.cfg" override="true">mvn:tr.org.liderahenk/lider-screenshot/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.script.cfg" override="true">mvn:tr.org.liderahenk/lider-script/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.usb.cfg" override="true">mvn:tr.org.liderahenk/lider-usb/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.usb.ltsp.cfg" override="true">mvn:tr.org.liderahenk/lider-usb-ltsp/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.user.privilege.cfg" override="true">mvn:tr.org.liderahenk/lider-user-privilege/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.wol.cfg" override="true">mvn:tr.org.liderahenk/lider-wol/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.antivirus.cfg" override="true">mvn:tr.org.liderahenk/lider-antivirus/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.service.cfg" override="true">mvn:tr.org.liderahenk/lider-service/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.localuser.cfg" override="true">mvn:tr.org.liderahenk/lider-local-user/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.firewall.cfg" override="true">mvn:tr.org.liderahenk/lider-firewall/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.networkmanager.cfg" override="true">mvn:tr.org.liderahenk/lider-network-manager/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.password.cfg" override="true">mvn:tr.org.liderahenk/lider-password/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.sudoers.cfg" override="true">mvn:tr.org.liderahenk/lider-sudoers/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.disklimit.cfg" override="true">mvn:tr.org.liderahenk/lider-disk-limit/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.manageroot.cfg" override="true">mvn:tr.org.liderahenk/lider-manage-root/1.1/cfg</configfile>
        <configfile finalname="/etc/tr.org.liderahenk.restore.cfg" override="true">mvn:tr.org.liderahenk/lider-restore/1.1/cfg</configfile>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-remote-access/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-package-manager/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-package-manager-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-resource-usage/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-disk-quota/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-conky/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-browser/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-backup/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-backup-db/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-login-manager/1.1
		</bundle>
        <bundle start-level="90">wrap:mvn:com.jcraft/jsch/0.1.53</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-network-inventory/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-network-inventory-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-rsyslog/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-screensaver/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-screenshot/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-script/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-script-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-usb/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-usb-ltsp/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-usb-ltsp-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-user-privilege/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-wol/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-antivirus/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-service/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-service-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-local-user/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-firewall/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-network-manager/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-password/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-sudoers/1.1</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-disk-limit/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-disk-limit-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-manage-root/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-manage-root-db/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-restore/1.1
		</bundle>
        <bundle start-level="90">mvn:tr.org.liderahenk/lider-restore-db/1.1
		</bundle>
    </feature>
    <feature name="lider-dependent-bundles" description="Lider Ahenk Karaf Features" version="1.1.0">
        <feature prerequisite="true" dependency="false">wrap</feature>
        <feature prerequisite="false" dependency="false">lider-deps-persistence</feature>
        <feature prerequisite="false" dependency="false">war</feature>
        <feature prerequisite="false" dependency="false">webconsole</feature>
        <feature prerequisite="false" dependency="false">spring-web</feature>
        <feature prerequisite="false" dependency="false">spring</feature>
        <feature prerequisite="false" dependency="false">spring-dm</feature>
        <feature prerequisite="false" dependency="false">spring-dm-web</feature>
        <feature prerequisite="false" dependency="false">config</feature>
        <feature prerequisite="false" dependency="false">wrapper</feature>
        <feature prerequisite="false" dependency="false">eventadmin</feature>
        <feature prerequisite="false" dependency="false">lider-deps-ldap</feature>
        <feature prerequisite="false" dependency="false">obr</feature>
        <bundle start-level="50">mvn:org.codehaus.jackson/jackson-core-asl/1.9.13
		</bundle>
        <bundle start-level="50">mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13
		</bundle>
        <bundle start-level="50">mvn:commons-lang/commons-lang/2.6</bundle>
        <bundle start-level="50">mvn:commons-collections/commons-collections/3.2.1
		</bundle>
        <bundle start-level="50">mvn:commons-pool/commons-pool/1.6</bundle>
        <bundle start-level="50">mvn:org.apache.mina/mina-core/2.0.7
		</bundle>
        <bundle start-level="50">mvn:org.mariadb.jdbc/mariadb-java-client/1.4.5
		</bundle>
        <bundle start-level="50">mvn:commons-beanutils/commons-beanutils/1.8.3
		</bundle>
        <bundle start-level="50">wrap:mvn:commons-logging/commons-logging/1.1.1
		</bundle>
        <bundle start-level="50">wrap:mvn:c3p0/c3p0/0.9.1.1</bundle>
        <bundle start-level="50">mvn:commons-dbcp/commons-dbcp/1.4</bundle>
        <bundle start-level="50">mvn:net.sf.ehcache/ehcache/2.8.0</bundle>
        <bundle start-level="50">wrap:mvn:antlr/antlr/2.7.7</bundle>
        <bundle start-level="50">mvn:commons-codec/commons-codec/1.10
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-core/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.jxmpp/jxmpp-core/0.4.2</bundle>
        <bundle start-level="50">mvn:org.jxmpp/jxmpp-util-cache/0.4.2
		</bundle>
        <bundle start-level="50">wrap:mvn:xpp3/xpp3/1.1.4c</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-extensions/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-im/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-tcp/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-sasl-javax/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-java7/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.igniterealtime.smack/smack-resolver-javax/4.1.5
		</bundle>
        <bundle start-level="50">mvn:org.apache.shiro/shiro-core/1.2.4
		</bundle>
        <bundle start-level="50">mvn:org.apache.shiro/shiro-web/1.2.4
		</bundle>
        <bundle start-level="50">mvn:org.apache.shiro/shiro-spring/1.2.4
		</bundle>
        <bundle start-level="50">mvn:org.apache.shiro/shiro-ehcache/1.2.4
		</bundle>
        <bundle start-level="50">mvn:commons-io/commons-io/2.4</bundle>
        <bundle start-level="50">mvn:org.apache.commons/commons-compress/1.7
		</bundle>
        <bundle start-level="50">mvn:org.tukaani/xz/1.4</bundle>
        <bundle start-level="50">mvn:com.hazelcast/hazelcast-all/3.1.7
		</bundle>
        <bundle start-level="50">mvn:log4j/log4j/1.2.17</bundle>
        <bundle start-level="50">mvn:org.slf4j/slf4j-log4j12/1.6.1</bundle>
        <bundle start-level="50">mvn:org.slf4j/slf4j-api/1.6.1</bundle>
        <bundle start-level="45">wrap:mvn:javax.mail/javax.mail-api/1.5.5
		</bundle>
        <bundle start-level="45">wrap:mvn:com.sun.mail/javax.mail/1.5.5
		</bundle>
        <bundle start-level="45">wrap:mvn:com.itextpdf/itextpdf/5.5.9
		</bundle>
    </feature>
    <feature name="lider-deps-ldap" version="1.1.0">
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-client-api/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-codec-core/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-asn1-api/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-asn1-ber/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-schema-data/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-i18n/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-model/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-extras-aci/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-util/1.0.0-M20
		</bundle>
        <bundle start-level="50">mvn:org.apache.directory.api/api-ldap-net-mina/1.0.0-M20
		</bundle>
    </feature>
    <feature name="lider-deps-persistence" version="1.1.0">
        <feature prerequisite="false" dependency="false">lider-jpa</feature>
        <feature prerequisite="false" dependency="false">lider-transaction</feature>
        <feature prerequisite="false" dependency="false">jndi</feature>
        <feature prerequisite="false" dependency="false">lider-openjpa</feature>
    </feature>
    <feature name="lider-openjpa" description="Apache OpenJPA 2.3.x persistence engine support" version="2.3.0">
        Enable Apache OpenJPA as persistence engine.
        <feature prerequisite="false" dependency="false">lider-jpa</feature>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
		</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
		</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.2
		</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1
		</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
		</bundle>
        <bundle dependency="true">mvn:commons-lang/commons-lang/2.6</bundle>
        <bundle dependency="true">mvn:commons-collections/commons-collections/3.2.1
		</bundle>
        <bundle dependency="true">mvn:commons-pool/commons-pool/1.6</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3
		</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.7.0_6
		</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.14.1_1
		</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
		</bundle>
        <bundle dependency="true">mvn:org.apache.xbean/xbean-asm4-shaded/3.16
		</bundle>
        <bundle start-level="29">mvn:org.apache.openjpa/openjpa/2.3.0
		</bundle>
    </feature>
    <feature name="lider-transaction" description="OSGi Transaction Manager" version="1.1.0">
        JTA implementation provided by Apache Aries Transaction 1.1.0

        <config name="org.apache.aries.transaction" append="false">
			aries.transaction.recoverable = true
			aries.transaction.timeout = 600
			aries.transaction.howl.logFileDir = ${karaf.data}/txlog
			aries.transaction.howl.maxLogFiles = 2
			aries.transaction.howl.maxBlocksPerFile = 512
			aries.transaction.howl.bufferSizeKBytes = 4
		</config>
        <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
		</bundle>
        <bundle start-level="30">mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
		</bundle>
        <bundle start-level="31">mvn:org.apache.aries.transaction/org.apache.aries.transaction.blueprint/1.0.1
		</bundle>
    </feature>
    <feature name="lider-jpa" description="OSGi Persistence Container" version="0.0.0.__aries_jpa_version_">
        JPA implementation provided by Apache Aries JPA
			${aries.jpa.version}. NB: this feature doesn't provide the JPA
			engine, you have to install one by yourself (OpenJPA for instance)

        <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
		</bundle>
        <bundle start-level="30" dependency="true">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
		</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.2
		</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.4
		</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.2
		</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.4
		</bundle>
    </feature>
    <feature name="lider-features" description="Lider Ahenk Karaf Features" version="1.1.0">
        <bundle>mvn:log4j/log4j/1.2.17</bundle>
        <bundle>mvn:org.slf4j/slf4j-log4j12/1.6.1</bundle>
        <bundle>mvn:org.slf4j/slf4j-api/1.6.1</bundle>
        <bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/1.1.0</bundle>
        <bundle>mvn:org.osgi/org.osgi.compendium/5.0.0</bundle>
        <bundle>mvn:org.osgi/org.osgi.core/6.0.0</bundle>
    </feature>
</features>


code:
# Plugin definition
plugin.name = firewall
plugin.version = 1.1
plugin.description = Lider Ahenk firewall plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = local-user
plugin.version = 1.1
plugin.description = Lider Ahenk local-user plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = login-manager
plugin.version = 1.1
plugin.description = Lider Ahenk Login Manager Plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = manage-root
plugin.version = 1.1
plugin.description = Lider Ahenk Manage Root plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = network-inventory
plugin.version = 1.1
plugin.description = Lider Network Inventory Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = true
plugin.x.based = false


code:
# Plugin definition
plugin.name = network-manager
plugin.version = 1.1
plugin.description = Lider Ahenk network-manager plugin
plugin.machine.oriented = false
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = package-manager
plugin.version = 1.1
plugin.description = Lider Package Manager Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = true
plugin.x.based = false


code:
# Plugin definition
plugin.name = password
plugin.version = 1.1
plugin.description = Lider Ahenk password plugin
plugin.machine.oriented = false
plugin.user.oriented = true
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = remote-access
plugin.version = 1.1
plugin.description = Lider Remote Access (VNC) Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = resource-usage
plugin.version = 1.1
plugin.description = Lider Ahenk resource-usage plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = restore
plugin.version = 1.1
plugin.description = Lider Ahenk restore plugin
plugin.machine.oriented = false
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = rsyslog
plugin.version = 1.1
plugin.description = Lider Ahenk rsyslog plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = true
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = screensaver
plugin.version = 1.1
plugin.description = Lider Ahenk Screensaver Plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = screenshot
plugin.version = 1.1
plugin.description = Lider Screenshot Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = true
plugin.x.based = true


code:
# Plugin definition
plugin.name = script
plugin.version = 1.1
plugin.description = Lider Ahenk script plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin definition
plugin.name = service
plugin.version = 1.1
plugin.description = Lider Ahenk service plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = true
plugin.x.based = false


code:
# Plugin info
plugin.name = sudoers
plugin.version = 1.1
plugin.description = Lider Sudoers Plugin
plugin.machine.oriented = false
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = usb-ltsp
plugin.version = 1.1
plugin.description = Lider USB LTSP Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = usb
plugin.version = 1.1
plugin.description = Lider USB Plugin
plugin.machine.oriented = true
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = user-privilege
plugin.version = 1.1
plugin.description = Lider User Privilege Plugin
plugin.machine.oriented = false
plugin.user.oriented = true
plugin.policy.plugin = true
plugin.task.plugin = false
plugin.uses.file.transfer = false
plugin.x.based = false


code:
# Plugin info
plugin.name = wol
plugin.version = 1.1
plugin.description = Lider Wake-on-Lan (WOL) Plugin
plugin.machine.oriented = true
plugin.user.oriented = false
plugin.policy.plugin = false
plugin.task.plugin = true
plugin.uses.file.transfer = false
plugin.x.based = false


code:
#!/bin/bash
/bin/sh /usr/share/lider-server/bin/karaf server

path: lider-sunucu


code:
[Unit]
Description=Starts Lider at system startup
After=network.target

[Service]
Type=simple
ExecStart=/bin/sh /usr/share/lider-server/bin/karaf server
PIDFile=/var/run/lider.pid
Restart=always

[Install]
WantedBy=multi-user.target


code:
# Tanım: Lider-Ahenk Uygulaması Milis Linux Çalışması.
# URL: https://notabug.org/milisarge/lider-sunucu/
# Paketçi: milisarge
# Gerekler: openjdk
# Grup: sistem

isim=lider-sunucu
surum=git
devir=1
kaynak=()

derle() {
	git_indir https://notabug.org/milisarge/lider-sunucu/ $isim
	cd "$SRC/$isim"
	make DESTDIR="$PKG" install
}

path: talimat


code:
# Possible values: http, local, inner
file.protocol = local
file.path = /usr/share/lider-server/records


code:
[submodule "godot_headers"]
	path = godot_headers
	url = https://github.com/GodotNativeTools/godot_headers

repo_name: Houkime/godot

path: .gitmodules

license: mit


code:
CC	:= gcc
CCFLAGS	:= -std=c11 -fPIC -Isrc -I./godot_headers/
LDFLAGS := -rdynamic -shared -pthread -lmodbus

OBJ	:= src/simple.o
TARGETS := simple/bin/libsimple.so
LIBS	:=

.PHONY: all

all: $(TARGETS)

$(OBJ): %.o : %.c
	$(CC) -c -o $@ $< $(CCFLAGS)

$(TARGETS): % : $(OBJ)
	$(CC) -o $@ $(LIBS) $^ $(CCFLAGS) $(LDFLAGS)

path: Makefile


code:
# Godot-Modbus Demo

## Modbus? For Godot? Seriously? Why?

Well, just how Spacechem, Infinifactory and other Zachtronics games are a fun way to learn about basic programming technics and test one's logic at competition-grade tasks, one can try learning about industrial control tools via puzzles as well.

The whole idea is to make Godot simulate industrial devices and expose them as network ports so you can use any modbus-capable industrial control suite out there, including PLCs and even your own python scripts to try and make the puzzle work.

It doesn't even matter if tools are opensource or not, they just need to be able to send packets. ^^

So if you are really into industrial control and want to see how hard are different tools to get into /use you can try different tools for your favourite puzzle and decide what tool makes your day easier! Kind of a convenience benchmark really.

No actual levels are there yet though, it is just a technical demo, but it is not hard to make both devices and levels of your own if you know Godot. This is all very simple really.

## Ok, how this works?:

To be able to connect via modbus, [libmodbus](https://github.com/stephane/libmodbus) is used as the lowest level.

For Godot engine, ability to use libmodbus is added by writing a shared object compiled against GDNative API - this allows Godot to call C functions from its usual GDscript internal scripting interface without the need to recompile the whole engine (unlike C/C++ modules that need to be compiled into engine itself).

Inside a shared object it is barebones modbus functionality like register and coil IO and starting a server which listens on a socket.

In Godot, this functionallity is then called from the base GDscript class `ModbusServer`, which for cleaner configuration is then used by `ModbusSpatial` which inherits a `Spatial` node (i.e. is placeable on the scene) and exposes bind IP and port settings so they are editable from the editor when you place it.

`ModbusSpatial` is then inherited by all controllable devices which use this inheritance to send or receive data via modbus protocol. Connection parameters of every one of them can be set by just clicking on sensor/actuator and editing bind IP and port fields.

Aside from using ModbusSpatial to send and receive some data, controllable devices are perfectly normal godot game objects, and also demo includes a conveyor and box spawner that are not modbus-controllable.

## Modbus demostrating devices

* **Sensor** is a distance sensor that outputs distance in units x 100 (game scene is grid-based in this demo)
	* It writes the resulting distance integer to the holding register of offset 0.
* **Pusher** is a simple modbus coil driven device. It tries to extends when coil (at offset 0) is 1 and tries to contract when coil is 0.

## Setting stuff up!

### 1. Install godot and libmodbus on your host machine.

#### on Arch Linux and Manjaro:

```
sudo pacman -S godot
```

libmodbus can be fetched from AUR [https://aur.archlinux.org/packages/libmodbus-git/](https://aur.archlinux.org/packages/libmodbus-git/)

#### on Debian:

```
sudo apt install godot3 libmodbus5 libmodbus-dev
```

### 2. Clone this repository

```
git clone https://notabug.org/Houkime/godot-modbus-demo
cd godot-modbus-demo
git submodule update --init
```

### 3. Compile

```
make
```

### 4. Edit connection parameters

```
cd simple
godot -e Pushertest.tscn
```

* Click on sensor (blue), and set network parameters you want on the left.

![](https://notabug.org/Houkime/godot-modbus-demo/raw/master/screenshots/sensor-screen_scaled.png)

Port is arbitrary, just don't let ports of different devices collide.

* Same for the pusher (orange)
![](https://notabug.org/Houkime/godot-modbus-demo/raw/master/screenshots/pusher-screen_scaled.png)

* Save with ctrl+S or whatever

**Alternatively** you can do the same by opening scene file in vim or your other (blasphemy!) favourite editor.

For example, the pusher looks like this, so you can just edit 2 last lines, adding lines if sth is missing (godot does not save settings that are set to their default values, for example default ip is 127.0.0.1)

```
[node name="Pusher" type="Spatial" parent="."]
transform = Transform( -8.14603e-08, 0, -0.5, 0, 0.5, 0, 0.5, 0, -8.14603e-08, 5, 1, -1 )
script = ExtResource( 1 )
address = "192.168.0.1"
port = 5040
```

And Sensor is called Sensor!

_(TODO: address should really be called sth like bind-ip but i am not sure this is intuitive)_

However, even if you're going text route, there is no CLI option for Godot to reimport assets (at least a direct one, which is a shame). You will have trouble if trying running right away without doing `godot -e Main.tscn` (it does reimporting by itself, you can close then).

### 5. Run

Run with f5 with editor open (at Main.tscn, not Pushertest.tscn) or from terminal `godot Main.tscn`

_Note: cd into the 'simple' folder if necessary - something inside Godot depends on terminal calling these commands from the folder and giving subtle errors in other cases, so you can't always do simple/Main.tscn from godot-modbus-demo_

Devices don't do anything by themselves, but `lsof -i` should report related ports as listening.

You can then use any tool to connect and try do sth interesting.

**HAVE A BLAST!**


code:
extends Spatial

export var speed = 1.0

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
func _ready():
	var mat = $belt/graphics.get_surface_material(0)
	mat.set_shader_param("speed",speed)
	$StaticBody.constant_linear_velocity.x = speed
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass


code:
extends KinematicBody

var phase = 0.0
var freq = 1.0
var rot_freq = 2.0
var amplitude = 1.0

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

func _process(delta):
	phase = wrapf(phase + freq*delta,0,2*PI)
	translation = Vector3(0,amplitude*sin(phase),0)
	rotate_x(freq*delta)
	rotate_y(freq*delta)
	rotate_z(freq*delta/2.0)

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass


code:
[gd_scene load_steps=7 format=2]

[ext_resource path="res://Spatial.gd" type="Script" id=1]
[ext_resource path="res://skyshader.tres" type="Material" id=2]
[ext_resource path="res://Pushertest.tscn" type="PackedScene" id=3]
[ext_resource path="res://firewall.gd" type="Script" id=7]

[sub_resource type="BoxShape" id=1]
extents = Vector3( 13.3624, 1, 18.5475 )

[sub_resource type="SphereMesh" id=2]
flip_faces = true

[node name="MAIN" type="Spatial"]
script = ExtResource( 1 )

[node name="Pushertest" parent="." instance=ExtResource( 3 )]

[node name="Area" type="Area" parent="."]
script = ExtResource( 7 )
__meta__ = {
"_edit_lock_": true
}

[node name="CollisionShape" type="CollisionShape" parent="Area"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -6.34348, 0 )
shape = SubResource( 1 )

[node name="Sky" type="MeshInstance" parent="."]
transform = Transform( 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0 )
mesh = SubResource( 2 )
material/0 = ExtResource( 2 )
__meta__ = {
"_edit_lock_": true
}


code:
extends Node

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass


code:
extends Node

class_name ModbusServer
var c_backend = load('res://simple.gdns').new()
var hold_register = 17 setget set_holding_register, get_holding_register #single for now
#var coils = [0,0,0,0]

func _init(address, port):
	c_backend.start_server(address, port)

func set_holding_register(value):
	c_backend.set_holding_register(value)

func get_holding_register():
	return c_backend.get_holding_register()

func get_coil():
	return c_backend.get_coil()


code:
extends Spatial
class_name ModbusSpatial

export var address = "127.0.0.1"
export var port = 5020
var ms

func _ready():
	print("creating sth with " + address + " " + str(port))
	ms = ModbusServer.new(address, port)


code:
[gd_scene load_steps=14 format=2]

[ext_resource path="res://SimplePusher.gd" type="Script" id=1]
[ext_resource path="res://Spawner.gd" type="Script" id=2]
[ext_resource path="res://pushermat.tres" type="Material" id=3]
[ext_resource path="res://Sensor.tscn" type="PackedScene" id=4]
[ext_resource path="res://Conveyor.tscn" type="PackedScene" id=5]
[ext_resource path="res://blockshader_ghost.shader" type="Shader" id=6]

[sub_resource type="CubeMesh" id=1]

[sub_resource type="ShaderMaterial" id=2]
shader = ExtResource( 6 )
shader_param/color = Color( 0.227451, 0.521569, 0.521569, 1 )
shader_param/scale = 113.0

[sub_resource type="CubeMesh" id=3]

[sub_resource type="CubeMesh" id=4]

[sub_resource type="SpatialMaterial" id=5]
flags_unshaded = true
albedo_color = Color( 0.207843, 0.207843, 0.207843, 1 )

[sub_resource type="ConvexPolygonShape" id=6]
points = PoolVector3Array( -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1 )

[sub_resource type="CylinderMesh" id=7]

[node name="Pushertest" type="Spatial"]

[node name="Spawner" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
script = ExtResource( 2 )

[node name="MeshInstance" type="MeshInstance" parent="Spawner"]
transform = Transform( 0.48, 0, 0, 0, 0.48, 0, 0, 0, 0.48, 0, 0, 0 )
mesh = SubResource( 1 )
material/0 = SubResource( 2 )

[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 2.01221, 6.90506 )
far = 8192.0

[node name="Pusher" type="Spatial" parent="."]
transform = Transform( -8.14603e-08, 0, -0.5, 0, 0.5, 0, 0.5, 0, -8.14603e-08, 5, 1, -1 )
script = ExtResource( 1 )
port = 5040

[node name="MeshInstance" type="MeshInstance" parent="Pusher"]
transform = Transform( 0.8, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 0, 0 )
mesh = SubResource( 3 )
material/0 = ExtResource( 3 )

[node name="PusherHandle" type="Spatial" parent="Pusher"]

[node name="MeshInstance2" type="MeshInstance" parent="Pusher/PusherHandle"]
transform = Transform( 0.2, 0, 0, 0, 1, 0, 0, 0, 1, 0.8, 0, 0 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )

[node name="KinematicBody" type="KinematicBody" parent="Pusher/PusherHandle"]

[node name="CollisionShape" type="CollisionShape" parent="Pusher/PusherHandle/KinematicBody"]
transform = Transform( 0.2, 0, 0, 0, 1, 0, 0, 0, 1, 0.8, 0, 0 )
shape = SubResource( 6 )

[node name="shaft_handle" type="Spatial" parent="Pusher"]
transform = Transform( -1.31134e-08, -0.1, 0, 0.3, -4.37114e-09, 0, 0, 0, 0.3, 0.6, 0, 0 )

[node name="MeshInstance2" type="MeshInstance" parent="Pusher/shaft_handle"]
transform = Transform( 1, 7.10543e-15, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
mesh = SubResource( 7 )
material/0 = null

[node name="Sensor" parent="." instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 4, 0 )
port = 5010

[node name="Conveyor" parent="." instance=ExtResource( 5 )]

[node name="Conveyor2" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1, 0, 0 )

[node name="Conveyor3" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 2, 0, 0 )

[node name="Conveyor4" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 3, 0, 0 )

[node name="Conveyor5" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 4, 0, 0 )

[node name="Conveyor6" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 5, 0, 0 )

[node name="Conveyor7" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 6, 0, 0 )


code:
extends ModbusSpatial

func _physics_process(delta):
	ms.hold_register = floor($RayCast.distance*100.0)


code:
extends ModbusSpatial

var speed = 1;
var max_extension = 1.0;
var extension = 0;
var min_shaft_len = 0.1; # godot does not like zero-lenth things

func _physics_process(delta):
	var needs_to_extend = ms.get_coil()
	#var needs_to_extend = false
	#var just_to_read = ms.get_coil()
	#print(needs_to_extend)

	if needs_to_extend and extension < max_extension:
		extension = clamp($PusherHandle.translation.x/2.0 + speed * delta, 0, max_extension)
		$PusherHandle.translation.x = extension * 2
		$shaft_handle.scale.y = max(extension, min_shaft_len)
	if !needs_to_extend and extension > 0:
		extension = clamp($PusherHandle.translation.x/2.0 - speed * delta, 0, max_extension)
		$PusherHandle.translation.x = extension * 2
		$shaft_handle.scale.y = max(extension, min_shaft_len)


code:
extends Spatial

export var frequency = 0.3
onready var timer = Timer.new()
var boxscene = preload("res://TestBox.tscn")

func _ready():
	timer.wait_time = 1.0/float(frequency)
	timer.connect("timeout",self,"spawn")
	add_child(timer)
	timer.start()
	spawn()

func spawn():
	var box = boxscene.instance()
	add_child(box)


code:
[gd_scene load_steps=4 format=2]

[ext_resource path="res://basic_cube.tscn" type="PackedScene" id=1]

[sub_resource type="PhysicsMaterial" id=1]
rough = true

[sub_resource type="BoxShape" id=2]

[node name="TestCube" type="RigidBody"]
physics_material_override = SubResource( 1 )
can_sleep = false

[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
shape = SubResource( 2 )

[node name="test_cube" parent="." instance=ExtResource( 1 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )


code:
[gd_scene load_steps=4 format=2]

[ext_resource path="res://blockshader.shader" type="Shader" id=1]

[sub_resource type="CubeMesh" id=1]

[sub_resource type="ShaderMaterial" id=2]
shader = ExtResource( 1 )
shader_param/color = Color( 0.686275, 0.65098, 0.0784314, 1 )
shader_param/scale = 113.0

[node name="test_cube" type="MeshInstance"]
mesh = SubResource( 1 )
material/0 = SubResource( 2 )


code:
shader_type spatial;
render_mode unshaded;

uniform vec4 bg_color: hint_color;
uniform vec4 fg_color: hint_color;
uniform float scale;
uniform float speed;

bool triangle(float x,float y){
//	if (x < 0.3) {
//		return false;
//	}
	if (abs(y-0.5)+x-0.5 > 0.5) {
		return false;
	}
	if (abs(y-0.5)+x-0.5 < 0.3) {
		return false;
	}
	return true;
}

void fragment(){
	float x = UV.x;
	float y = UV.y;
	float unity = 1.0;

	x -= TIME*speed;
	x = x - floor(x);

	if (triangle(x,y)){
		ALBEDO = fg_color.xyz;
	} else{
		ALBEDO =  bg_color.xyz;
	}
}


code:
shader_type spatial;
render_mode unshaded;

uniform vec4 color: hint_color;
uniform float scale;

void fragment()
{
	ALBEDO=color.xyz;
	if (cos(UV.x*scale/6.)>=0.9||cos(UV.y*scale/9.)>=0.9){
	ALBEDO=vec3(1,1,1);
	}
}


code:
shader_type spatial;
render_mode unshaded;
render_mode blend_add;

uniform vec4 color: hint_color;
uniform float scale;

void fragment()
{
	float screen_y = mod(SCREEN_UV.y + TIME/30.0, 1.0);
	if (mod(screen_y, 1.0/100.0) <= 0.005){
		discard;
	}
	ALBEDO=color.xyz;
	if (cos(UV.x*scale/6.)>=0.9||cos(UV.y*scale/9.)>=0.9){
	ALBEDO=vec3(1,1,1);
	}
}


code:
extends Label

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

func _process(delta):
	text = "Distance: " + str($"../Sensor/RayCast".distance)

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass


code:
extends Area

func _ready():
	connect("body_entered",self,"destroy_intruders")

func destroy_intruders(body):
	body.queue_free()


code:
[entry]

X11.64="res://bin/libsimple.so"

[dependencies]

X11.64=[  ]

[general]

singleton=false
load_once=false
symbol_prefix="godot_"
reloadable=true


code:
[gd_resource type="Environment" load_steps=2 format=2]

[sub_resource type="ProceduralSky" id=1]

[resource]
background_sky = SubResource( 1 )


code:
[gd_resource type="SpatialMaterial" format=2]

[resource]
flags_unshaded = true


code:
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;   [section] ; section goes between []
;   param=value ; assign values to parameters

config_version=4

_global_script_classes=[ {
"base": "Node",
"class": "ModbusServer",
"language": "GDScript",
"path": "res://Modbus_Server.gd"
}, {
"base": "Reference",
"class": "ModbusServerNative",
"language": "NativeScript",
"path": "res://simple.gdns"
}, {
"base": "Spatial",
"class": "ModbusSpatial",
"language": "GDScript",
"path": "res://Modbus_Spatial.gd"
} ]
_global_script_class_icons={
"ModbusServer": "",
"ModbusServerNative": "",
"ModbusSpatial": ""
}

[application]

run/main_scene="res://Main.tscn"

[physics]

3d/physics_engine="GodotPhysics"

[rendering]

environment/default_environment="res://new_environment.tres"


code:
[gd_resource type="SpatialMaterial" format=2]

[resource]
flags_unshaded = true
albedo_color = Color( 0.988235, 0.694118, 0.0745098, 1 )


code:
extends RayCast

export var maxlength = 10.0

var distance = 0

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
func _ready():
	cast_to = Vector3(0,-maxlength,0)

func _physics_process(delta):
	if !is_colliding():
		$intersection.visible = false
		$ray_handle.scale = Vector3(0,distance,0)
		return
	var collision_p = to_local(get_collision_point())
	distance = collision_p.length()
	$ray_handle.scale = Vector3(1,distance,1)
	$intersection.visible = true
	$intersection.translation = collision_p

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass


code:
[gd_resource type="NativeScript" load_steps=2 format=2]

[ext_resource path="res://libsimple.gdnlib" type="GDNativeLibrary" id=1]

[resource]
class_name = "ModbusServerNative"
library = ExtResource( 1 )
script_class_name = "ModbusServerNative"


code:
[gd_resource type="ShaderMaterial" load_steps=2 format=2]

[sub_resource type="Shader" id=1]
code = "shader_type spatial;
render_mode unshaded;

uniform float thickness;
uniform float step_theta;
uniform float step_phi;

void fragment(){

	if (mod(UV.y,step_theta*abs(1.0+sin(TIME/10.0)/2.0)) < thickness) {
	ALBEDO=vec3(255,0,255);
	} else{
		ALBEDO=vec3(0,0,0);
	}

}"

[resource]
shader = SubResource( 1 )
shader_param/thickness = 0.01
shader_param/step_theta = 0.056
shader_param/step_phi = null


code:
[remap]

importer="wavefront_obj"
type="Mesh"
path="res://.import/test_bevel.obj-4942f8b88902af268b9c7feccfac9954.mesh"

[deps]

files=[ "res://.import/test_bevel.obj-4942f8b88902af268b9c7feccfac9954.mesh" ]

source_file="res://test_bevel.obj"
dest_files=[ "res://.import/test_bevel.obj-4942f8b88902af268b9c7feccfac9954.mesh", "res://.import/test_bevel.obj-4942f8b88902af268b9c7feccfac9954.mesh" ]

[params]

generate_tangents=true
scale_mesh=Vector3( 1, 1, 1 )
offset_mesh=Vector3( 0, 0, 0 )
optimize_mesh=true


code:
#include "../godot_headers/gdnative_api_struct.gen.h"
#include <unistd.h>
#include <asm/unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <modbus/modbus.h>
#include <pthread.h>

#include <sys/types.h>
#include <sys/syscall.h>

const godot_gdnative_core_api_struct *api = NULL;
const godot_gdnative_ext_nativescript_api_struct *nativescript_api = NULL;

void *modbus_constructor(godot_object *p_instance, void *p_method_data);
void modbus_destructor(godot_object *p_instance, void *p_method_data, void *p_user_data);
godot_variant modbus_get_data(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args);

typedef struct user_data_struct {
	modbus_t *ctx;
	modbus_mapping_t *mb_mapping;
} user_data_struct;

user_data_struct ud;

//typedef struct server_parameters {
//	int port;
//	char *address;
//} server_parameters;

void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *p_options)
{
	api = p_options->api_struct;

	// Now find our extensions.
	for (int i = 0; i < api->num_extensions; i++) {
		switch (api->extensions[i]->type) {
			case GDNATIVE_EXT_NATIVESCRIPT: {
								nativescript_api = (godot_gdnative_ext_nativescript_api_struct *)api->extensions[i];
							}; break;
			default: break;
		}
	}
}

void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *p_options)
{
	api = NULL;
	nativescript_api = NULL;
}
void *server_routine(void *user_data_void_p)
{
	user_data_struct *user_data = (user_data_struct *) user_data_void_p;
	//printf("in server_routine address is %s and port is %d\n", user_data->ctx->address, user_data->ctx->port);
	int s = -1;
	for (;;) {

		s = modbus_tcp_listen(user_data->ctx, 1);
		printf("before accept\n");
		printf("[%d]: outer loop \n", syscall(__NR_gettid));
		modbus_tcp_accept(user_data->ctx, &s);

		for (;;) {
			uint8_t query[MODBUS_TCP_MAX_ADU_LENGTH];
			int rc;

			printf("[%d]: inner loop entry\n", syscall(__NR_gettid));
			rc = modbus_receive(user_data->ctx, query);
			if (rc > 0) {
				/* rc is the query size */
				modbus_reply(user_data->ctx, query, rc, user_data->mb_mapping);
			} else if (rc == -1) {
				/* Connection closed by the client or error */
				break;
			}
		}

		printf("Quit the loop: %s\n", modbus_strerror(errno));

		if (s != -1) {
			close(s);
		}
	}
	modbus_mapping_free(user_data->mb_mapping);
	modbus_close(user_data->ctx);
	modbus_free(user_data->ctx);
}

void *modbus_constructor(godot_object *p_instance, void *p_method_data)
{
	user_data_struct *user_data = api->godot_alloc(sizeof(user_data_struct));
	// init is delayed so that we can pass arguments normally
	return user_data;
}

void modbus_destructor(godot_object *p_instance, void *p_method_data, void *p_user_data)
{
	api->godot_free(p_user_data);
}

godot_variant modbus_get_holding_register(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args)
{
	godot_variant ret;
	user_data_struct *user_data = (user_data_struct *)p_user_data;
	int reg_num = 0;

	int value = user_data->mb_mapping->tab_registers[reg_num];
	api->godot_variant_new_int(&ret, value);
	return ret;
}

godot_variant modbus_set_holding_register(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args)
{
	godot_variant ret;
	user_data_struct *user_data = (user_data_struct *)p_user_data;
	int reg_num = 0;
	godot_variant *gd_value = p_args[0];

	int value = api->godot_variant_as_int(gd_value);
	user_data->mb_mapping->tab_registers[reg_num]=value;
	return ret;
}

godot_variant modbus_set_coil(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args)
{
	godot_variant ret;
	user_data_struct *user_data = (user_data_struct *)p_user_data;
	int reg_num = 0;
	godot_variant *gd_value = p_args[0];

	bool value = api->godot_variant_as_bool(gd_value);
	modbus_set_bits_from_byte(&user_data->mb_mapping->tab_bits[0], reg_num, (uint8_t) value);

	return ret;
}

godot_variant modbus_get_coil(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args)
{
	godot_variant ret;
	user_data_struct *user_data = (user_data_struct *)p_user_data;
	int reg_num = 0;
	int bit_idx = 0;

	uint8_t value = user_data->mb_mapping->tab_bits[reg_num];
	printf("get coil native: %d\n", value);
	value = ((value >> bit_idx)  & 0x01);
	api -> godot_variant_new_bool(&ret, (godot_bool) value); //godot_bool is just a typedefed bool
	return ret;
}

godot_variant modbus_start_server(godot_object *p_instance, void *p_method_data,
		void *p_user_data, int p_num_args, godot_variant **p_args)
{
	//server_parameters srv_parameters;
	pthread_t server_thread;
	//pthread_attr_t attr;
	int port;
	const char* address;
	godot_variant ret;

	user_data_struct *user_data = (user_data_struct *)p_user_data;

	//pthread_attr_init(&attr);

	// start_server(address,port)
	godot_variant *gd_variant_address = p_args[0];
	godot_variant *gd_variant_port = p_args[1];

	port = api->godot_variant_as_int(gd_variant_port);
	godot_string gd_string_address = api->godot_variant_as_string(gd_variant_address);
	godot_char_string gd_string_ascii_address = api->godot_string_ascii(&gd_string_address);
	address = api->godot_char_string_get_data(&gd_string_ascii_address);

	user_data->ctx = modbus_new_tcp(address, port);

	printf("created new context with address %s and port %d\n", address, port);

	user_data->mb_mapping = modbus_mapping_new(500, 500, 500, 500);
	if (user_data->mb_mapping == NULL) {
		fprintf(stderr, "Failed to allocate the mapping: %s\n",
				modbus_strerror(errno));
		modbus_free(user_data->ctx);
		return ret;
	}

	pthread_create(&server_thread, NULL, &server_routine, user_data);

	return ret;
}

void GDN_EXPORT godot_nativescript_init(void *p_handle)
{
	godot_instance_create_func create = { NULL, NULL, NULL };
	create.create_func = &modbus_constructor;

	godot_instance_destroy_func destroy = { NULL, NULL, NULL };
	destroy.destroy_func = &modbus_destructor;

	nativescript_api->godot_nativescript_register_class(p_handle, "ModbusServerNative", "Reference",
			create, destroy);

	godot_method_attributes attributes = { GODOT_METHOD_RPC_MODE_DISABLED };

	godot_instance_method get_holding_register = { NULL, NULL, NULL };
	get_holding_register.method = &modbus_get_holding_register;

	nativescript_api->godot_nativescript_register_method(p_handle, "ModbusServerNative", "get_holding_register",
			attributes, get_holding_register);

	godot_instance_method set_holding_register = { NULL, NULL, NULL };
	set_holding_register.method = &modbus_set_holding_register;

	nativescript_api->godot_nativescript_register_method(p_handle, "ModbusServerNative", "set_holding_register",
			attributes, set_holding_register);

	godot_instance_method start_server = { NULL, NULL, NULL };
	start_server.method = &modbus_start_server;

	nativescript_api->godot_nativescript_register_method(p_handle, "ModbusServerNative", "start_server",
			attributes, start_server);

	godot_instance_method set_coil = { NULL, NULL, NULL };
	set_coil.method = &modbus_set_coil;

	nativescript_api->godot_nativescript_register_method(p_handle, "ModbusServerNative", "set_coil",
			attributes, set_coil);

	godot_instance_method get_coil = { NULL, NULL, NULL };
	get_coil.method = &modbus_get_coil;

	nativescript_api->godot_nativescript_register_method(p_handle, "ModbusServerNative", "get_coil",
			attributes, get_coil);
}


code:
.*
!.gitignore
*~
*.db

repo_name: lucastx/desgovernanca

path: .gitignore


code:
desgovernanca-site
==================

Kopia adaptada e traduzida de <https://iuf.alternatifbilisim.org/>

Site no ar em <http://iuf.partidopirata.org>

Site de desenvolvimento (branch dev) em <http://iuf-dev.pirata.xyz>

Mais informações em <http://piratas.xyz/desgovernança/>

Esta kopia segue a licença original (GPL3).


code:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="320">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

	<meta name="description" content="Forum de Desgovernança da Internet Brasil é para aquelas(es) de nós que exigem internet livre, aberta e segura para todas(os)!">
	<meta name="author" content="piratas.xyz">
	<link type="text/plain" rel="author" href="../humans.txt" />

	<title>Blog da Desgovernança</title>

	<meta property="og:title" content="Forum de Desgovernança da Internet Brasil">
	<meta property="og:description" content="Forum de Desgovernança da Internet Brasil é para aquelas(es) de nós que exigem internet livre, aberta e segura para todas(os)!"/>
	<meta property="og:type" content="article">
	<meta property="og:image" content="../assets/iuf_quadrado.png">
	<meta property="og:url" content="http://iuf.partidopirata.org">

	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:site" content="@desgovernanca">
	<meta name="twitter:title" content="Forum de Desgovernança da Internet Brasil">
	<meta name="twitter:description" content="Forum de Desgovernança da Internet Brasil é para aquelas(es) de nós que exigem internet livre, aberta e segura para todas(os)!">
	<meta name="twitter:creator" content="@desgovernanca">
	<meta name="twitter:image:src" content="../assets/iuf_quadrado.png">
	<meta name="twitter:domain" content="iuf.partidopirata.org">

	<link href='../css/font.css' rel='stylesheet' type='text/css'>

	<link href="../css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap.css.map" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap-theme.css" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap-theme.css.map" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
	<link href="../css/carousel.css" rel="stylesheet" type="text/css">
	<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="../css/blog.css" rel="stylesheet" type="text/css">
	<link href="../css/main.css" rel="stylesheet" type="text/css">
	<link href="../css/pirata.css" rel="stylesheet" type="text/css">

	Voltar ao site

	 PT

	 EN

	 DE

Blog da Desgovernança

Para todo mundo que quiser ler mais sobre o que estamos tentando fazer.

A Mentira da "Governança da Internet" e sua Ilusão "Multi-stakeholder"

22 de Agosto de 2015 por Kannon

Por cerca de 15 anos os encontros de "Governança da Internet" tiveram muita atenção e levaram nossa imaginação no sentido de nos fazer acreditar que regras consensuais para a Internet podem surgir a partir de discussões globais "multi-stakeholder". Está se tornando óbvio que a "Governança da Internet" é uma maneira mentirosa de nos manter ocupados e esconder uma triste realidade: Nada de concreto nesses 15 anos, nem uma única ação sequer surgiu de reuniões "multi-stakeholder"; enquanto que ao mesmo tempo, a tecnologia em si tem sido usada contra os usuários da Internet como uma ferramenta de vigilância, controle e opressão.

Os cidadãos do mundo precisam pensar nos desafios críticos que vem pela frente: Acabar com a vigilância em massa, proteger as liberdades online de forma incondicional, garantir a Neutralidade da Rede, o acesso universal a Internet Livre… Nada disso foi abordado nessas discussões "multi-stakeholder" estéreis com listas fechadas de participantes, mas somente pelo contexto político adequado criado pelas redes descentralizadas de cidadãos organizados através de uma Internet Livre.

Por que nós esperaríamos por essas hyper-estruturas "multilaterais" funcionarem se elas não serviram para nada até agora?{3} Hoje já existe uma estrutura de manutenção coletiva da Internet: Nós, os cidadãos, nós todos somos donos da Internet, isso se nós considerarmos a Internet como a soma da Infraestrutura, sua tecnologia, e, o mais importante, a soma das atividades, os dados e o conteúdo que todos nós contribuímos para existir.Por que nós esperaríamos por essas hyper-estruturas "multilaterais" funcionarem se elas não serviram para nada até agora? Hoje já existe uma estrutura de manutenção coletiva da Internet: Nós, os cidadãos, nós todos somos donos da Internet, isso se nós considerarmos a Internet como a soma da Infraestrutura, sua tecnologia, e, o mais importante, a soma das atividades, os dados e o conteúdo que todos nós contribuímos para existir.

Nesse sentido, a Internet deve ser considerada um bem comum de todos.

Isto é exatamente o que precisamos exigir dos governos hoje, a partir das cinzas ainda quentes do cadáver do modelo "multilateral", esmagadas pelas botas das decisões unilaterais da NSA, do Google, do Facebook, da China, da Apple, da Rússia e de todos os outros que não esperaram um consenso para tomar medidas drásticas para alterar a forma como a tecnologia é usada para usá-la contra seus cidadãos.

Os governos precisam considerar a internet como um bem comum, e protegê-la da forma como ela é e de forma incondicional, como a mais preciosa reserva natural ou o ribeirão de águas mais cristalinas para beber. A partir daí nós devemos nos engajar no rico debate sobre a natureza da confiança que depositamos nos agentes públicos e privados que vão cuidar desse recurso. Que condições de transparência e de responsabilidade ( como o uso de software livre e a garantia do público poder verificá-lo) que exigimos em uma sociedade democrática para aqueles que são responsáveis por proteger nossas liberdades fundamentais e aqueles que controlam uma parte de nossa infra-estrutura comum?

Junte-se a nós em http://iuf.partidopirata.org, compartilhe por aí, e ativamente se some para desfazer a ilusão de "Governança na Internet multi-stakeholder".

Ajude a viabilizar o IUF2015

					Campanha no Banque

Contato

Email iuf@partidopirata.org

Qveet @desgovernanca

Tweet @desgovernanca

Telegram [IUF] Organização

Lista de e-mail iuf@lists.riseup.net

Loomio Força Tarefa IUF2015

Visite partidopirata.org

GPG

E-mail: iuri@pirata.xyz [sig]

Fingerprint: 9E8F F2D6 4E11 0012 BB8E CD35 4AA8 D5C3 63E6 E307

Compartilhe!

			Este site foi kopiado, traduzido e adaptado do original Internet Ungovernance Forum pelos piratas.xyz do Partido Pirata no Brasil através de debate e deliberação coletiva. Licença: GNU/GPL v3. Código fonte.

			Voltar ao topo


code:
/*
 * Globals
 */

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #555;
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  margin-top: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: normal;
  color: #333;
}

/*
 * Override Bootstrap's default container.
 */

@media (min-width: 1200px) {
  .container {
    width: 970px;
  }
}

/*
 * Masthead for nav
 */

.blog-masthead {
  background-color: #428bca;
  -webkit-box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
          box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
}

/* Nav links */
.blog-nav-item {
  position: relative;
  display: inline-block;
  padding: 10px;
  font-weight: 500;
  color: #cdddeb;
}
.blog-nav-item:hover,
.blog-nav-item:focus {
  color: #fff;
  text-decoration: none;
}

/* Active state gets a caret at the bottom */
.blog-nav .active {
  color: #fff;
}
.blog-nav .active:after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -5px;
  vertical-align: middle;
  content: " ";
  border-right: 5px solid transparent;
  border-bottom: 5px solid;
  border-left: 5px solid transparent;
}

/*
 * Blog name and description
 */

.blog-header {
  padding-top: 20px;
  padding-bottom: 20px;
}
.blog-title {
  margin-top: 30px;
  margin-bottom: 0;
  font-size: 60px;
  font-weight: normal;
}
.blog-description {
  font-size: 20px;
  color: #999;
}

/*
 * Main column and sidebar layout
 */

.blog-main {
  font-size: 18px;
  line-height: 1.5;
}

/* Sidebar modules for boxing content */
.sidebar-module {
  padding: 15px;
  margin: 0 -15px 15px;
}
.sidebar-module-inset {
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
}
.sidebar-module-inset p:last-child,
.sidebar-module-inset ul:last-child,
.sidebar-module-inset ol:last-child {
  margin-bottom: 0;
}

/* Pagination */
.pager {
  margin-bottom: 60px;
  text-align: left;
}
.pager > li > a {
  width: 140px;
  padding: 10px 20px;
  text-align: center;
  border-radius: 30px;
}

/*
 * Blog posts
 */

.blog-post {
  margin-bottom: 60px;
}
.blog-post-title {
  margin-bottom: 5px;
  font-size: 40px;
}
.blog-post-meta {
  margin-bottom: 20px;
  color: #999;
}

/*
 * Footer
 */

.blog-footer {
  padding: 40px 0;
  color: #999;
  text-align: center;
  background-color: #f9f9f9;
  border-top: 1px solid #e5e5e5;
}
.blog-footer p:last-child {
  margin-bottom: 0;
}