packaged Tine 2.0 worker
authorLars Kneschke <l.kneschke@metaways.de>
Tue, 19 Feb 2013 06:35:36 +0000 (07:35 +0100)
committerLars Kneschke <l.kneschke@metaways.de>
Tue, 19 Feb 2013 07:22:31 +0000 (08:22 +0100)
Change-Id: I3855dbf7aebcb735061e164823205f75516a1467
Reviewed-on: https://gerrit.tine20.org/tine20/1647
Tested-by: jenkins user
Reviewed-by: Lars Kneschke <l.kneschke@metaways.de>
scripts/packaging/debian/control
scripts/packaging/debian/etc/actionQueue.ini [new file with mode: 0644]
scripts/packaging/debian/tine20-worker.install [new file with mode: 0644]
scripts/packaging/debian/tine20-worker.upstart [new file with mode: 0644]

index 66a860a..61feac4 100644 (file)
@@ -12,7 +12,7 @@ Package: tine20
 Architecture: all
 Depends: ${misc:Depends}, 
  tine20-webstack (= ${binary:Version}),
- mysql-server
+ mysql-server | postgresql (>= 9.1)
 Description: webbased groupware and crm - metapackage
  Tine 2.0 is an open source project which combines groupware and CRM in one
  consistent interface. Tine 2.0 is web-based and optimises collaboration and
@@ -39,12 +39,12 @@ Depends: ${misc:Depends},
  wwwconfig-common, 
  apache2 | lighttpd | nginx,
  libapache2-mod-php5 | php5-fpm, 
- php5-mysql | php5-mysqli
+ php5-mysql | php5-mysqli | php5-pgsql
  php5-mcrypt, 
  php5-gd,
  php-apc,
  makepasswd
-Recommends: mysql-client
+Recommends: mysql-client | postgresql-client (>= 9.1)
 Description: Tine 2.0 webserver integration package
  This package integrates Tine 2.0 with the webserver, by installing all needed
  dependencies to make Tine 2.0 available via HTTP(S).
@@ -148,3 +148,17 @@ Depends: tine20-tinebase (= ${binary:Version}), tine20-sales (= ${binary:Version
 Description: webbased groupware and crm - humanresources module
  This package contains the humanresources module of Tine 2.0. Installing this package
  enables you to manage personal data about your employees. 
+
+Package: tine20-worker
+Architecture: all
+Depends: ${tine20:Modules},
+ tine20-libraries (= ${binary:Version}),
+ php5-mysql | php5-mysqli | php5-pgsql
+ php5-mcrypt, 
+ php5-gd,
+ php-apc
+ php5-cli
+ php5-redis (>= 2.2.2)
+Description: webbased groupware and crm - asynchronous worker
+ This package contains the asynchronous worker of Tine 2.0. Install this package
+ if you have a high number of users.
diff --git a/scripts/packaging/debian/etc/actionQueue.ini b/scripts/packaging/debian/etc/actionQueue.ini
new file mode 100644 (file)
index 0000000..a2ab73a
--- /dev/null
@@ -0,0 +1,5 @@
+[general]
+logfile  = /var/log/tine20/worker.log
+loglevel = 6
+
+[tine20]
diff --git a/scripts/packaging/debian/tine20-worker.install b/scripts/packaging/debian/tine20-worker.install
new file mode 100644 (file)
index 0000000..42b0a63
--- /dev/null
@@ -0,0 +1,2 @@
+debian/etc/actionQueue.ini     /etc/tine20
+worker.php                     /usr/share/tine20
diff --git a/scripts/packaging/debian/tine20-worker.upstart b/scripts/packaging/debian/tine20-worker.upstart
new file mode 100644 (file)
index 0000000..b89df1c
--- /dev/null
@@ -0,0 +1,21 @@
+# tine20-worker - process jobs stored in Tine 2.0 queue
+#
+
+description     "Tine 2.0 worker"
+
+start on filesystem
+stop on runlevel [06]
+
+setuid www-data
+
+pre-start script
+ # stop job from continuing if no config file found for Tine 2.0 queue worker
+ if [ ! -f /etc/tine20/actionQueue.ini ] ; then
+    stop; exit 0
+ fi
+
+end script
+
+respawn
+
+exec /usr/bin/php -d include_path="/etc/tine20" -f /usr/share/tine20/worker.php