phpide timetracker_1.19-2
authorMichael Wagner <michael@wagnertech.de>
Wed, 24 Jul 2019 13:23:19 +0000 (15:23 +0200)
committerMichael Wagner <michael@wagnertech.de>
Wed, 24 Jul 2019 13:23:19 +0000 (15:23 +0200)
WEB-INF/config.php.dist
debian/.dummy [new file with mode: 0644]
debian/timetracker.changelog [new file with mode: 0644]
debian/timetracker.conf [new file with mode: 0644]
debian/timetracker.control [new file with mode: 0644]
debian/timetracker.cp [new file with mode: 0755]
debian/timetracker.postinst [new file with mode: 0755]

index 1785336..a872f3e 100644 (file)
@@ -37,7 +37,7 @@ set_include_path(realpath(dirname(__FILE__).'/lib/pear') . PATH_SEPARATOR . get_
 // CHANGE 3 PARAMETERS HERE!
 // In this example: "root" is username, "no" is password, "dbname" is database name.
 //
-define('DSN', 'mysqli://root:no@localhost/dbname?charset=utf8mb4');
+define('DSN', 'mysqli://ttuser:Ttuser09@localhost/timetracker?charset=utf8mb4');
 // Do NOT change charset unless you upgraded from an older Time Tracker where charset was NOT specified
 // and now you see some corrupted characters. See http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html
 
@@ -56,7 +56,7 @@ define('MULTIORG_MODE', true);
 //
 // define('APP_NAME', 'timetracker');
 //
-define('APP_NAME', '');
+define('APP_NAME', 'WagnerTech - timetracker');
 
 
 // WEEKEND_START_DAY
diff --git a/debian/.dummy b/debian/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/timetracker.changelog b/debian/timetracker.changelog
new file mode 100644 (file)
index 0000000..d6d6800
--- /dev/null
@@ -0,0 +1,3 @@
+timetracker (1.19-%BUILD%) unstable; urgency=medium
+  * time tracker download 2.7.2019
+ -- Michael Wagner <michael@wagnertech.de>  Tue, 02 Jul 2019 16:00:00 +0100
diff --git a/debian/timetracker.conf b/debian/timetracker.conf
new file mode 100644 (file)
index 0000000..9e09c8e
--- /dev/null
@@ -0,0 +1,3 @@
+# Configuration for timetracker
+Alias /timetracker/ /usr/share/php/timetracker/
+
diff --git a/debian/timetracker.control b/debian/timetracker.control
new file mode 100644 (file)
index 0000000..307d116
--- /dev/null
@@ -0,0 +1,11 @@
+Source: timetracker
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git
+Package: timetracker
+Architecture: all
+Depends: php5-mysql
+Description: Anuko Time Tracker
+
diff --git a/debian/timetracker.cp b/debian/timetracker.cp
new file mode 100755 (executable)
index 0000000..3033e2d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+mkdir -p $1/usr/share/php/timetracker
+rsync -av --delete --exclude='debian' --exclude='.git' ./ $1/usr/share/php/timetracker/
+
+mkdir -p $1/etc/apache2/sites-available
+cp debian/timetracker.conf $1/etc/apache2/sites-available/
+
diff --git a/debian/timetracker.postinst b/debian/timetracker.postinst
new file mode 100755 (executable)
index 0000000..f208db7
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+a2ensite timetracker.conf
+#systemd restart apache2
+/etc/init.d/apache2 restart
+
+chmod 777 /usr/share/php/timetracker/WEB-INF/templates_c
+
+# check, whether sysal user exists
+if ! mysql -uttuser -pTtuser09 timetracker -e";"
+then
+       echo "Installation of ttuser user ..."
+       echo "Password of mysql root:"
+       read pw
+       mysql -uroot -p$pw <<END
+create user ttuser@localhost identified by 'Ttuser09';
+create database timetracker CHARACTER SET = 'utf8mb4';
+grant all on timetracker.* to ttuser@localhost;
+END
+fi
+
+# Create Config File
+pushd /usr/share/php/timetracker/WEB-INF
+       if [ ! -f config.php ]
+       then
+               echo "copy standard config file"
+               cp config.php.dist config.php
+       fi
+popd
+
+echo "Check database with http://localhost/timetracker/dbinstall.php"
+echo "Login at http://localhost/timetracker/login.php"
+echo "Initial password: admin/secret"
+echo "Further information: https://www.anuko.com/time_tracker/index.htm"
+