File: setup.py

package info (click to toggle)
auth2db 0.2.5-2%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,512 kB
  • sloc: python: 2,280; php: 2,161; sh: 174; sql: 157; makefile: 81
file content (114 lines) | stat: -rw-r--r-- 3,622 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/python

#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#  Copyright (c) 2007,2008 Ezequiel Vera

#------------------------------------------------------------------------------
#  Nombre: auth2db.py
#  Autor: Ezequiel Vera (ezequielvera@yahoo.com.ar)
#  Ult. Modificacion: 17/04/2008
#  Description: Parsea los archivos auth en busca de logins (smb,ssh,su,login,gdm)
#               y lo pasa a una base de datos mysql que permite listar y ordenar 
#               los resultados.
#------------------------------------------------------------------------------

# Author: Ezequiel Vera
# 
# $Revision$

__author__ = "Ezequiel Vera"
__version__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2007,2008 Ezequiel Vera"
__license__ = "GPL"

from distutils.core import setup
#from common.version import version
from os.path import isfile, join, isdir
from sys import argv
from glob import glob
import os

longdesc = '''
Auth2db parses auth files and inserts details about logins into a MySQL database.
It allows you to display in the shell or in a Web front-end the date and time, IP, 
username and service (ssh, smb, login, su, gdm, etc.) for each login.'''

setup(
	name = "auth2db", 
	version = "0.2.3", 
	description = "Auth2db parses auth files and inserts details about logins into a MySQL database", 
	long_description = longdesc, 
	author = "Ezequiel Vera", 
	author_email = "ezequielvera@yahoo.com.ar", 
	url = "http://www.auth2db.com.ar", 
	license = "GPL", 
	platforms = "Posix", 
	scripts =	[
					'auth2db', 
					'auth2db-view', 
					'auth2db-config',
					'auth2db-alert'
				], 
	packages =	[
					'modules'
				], 
	data_files =	[
						('/etc/auth2db', 
							glob("config/*.conf")
						), 
						('/var/lib/auth2db/tmp', 
							glob("config/tmp/auth2db_sshd.log")
						),
						('/var/lib/auth2db/flag.d', 
							glob("config/flag.d/flag.dat")
						),
                    				('/etc/auth2db/error.d', 
							glob("config/error.d/error.log")
						), 
						('/usr/share/doc/auth2db/www', 
							glob("www/*")
						),
						('/usr/share/doc/auth2db/sql', 
							glob("setup/*.sql")
						),
                    				('/usr/share/doc/auth2db', 
                        				["CHANGELOG","README","TODO","LICENSE"]
						),
						('/etc/init.d', 
                        				["daemon/auth2db-daemon"]
						)
					]
)

# tmp folder
#os.system("mkdir /var/lib/auth2db/tmp")
# daemon permission
#os.system("/etc/init.d/auth2db-daemon stop")
os.system("chmod 755 /etc/init.d/auth2db-daemon")
# Remove
#os.system("update-rc.d -f auth2db-daemon remove")
#os.system("update-rc.d auth2db-daemon defaults")

# Update config file
if argv[1] == "install":
	print
	print "Please do not forget to update your configuration files."
	print "They are in /etc/auth2db/."
	print "Execute 'auth2db-config' to config server and clients machines."
	print "Start auth2db daemon with '/etc/init.d/auth2db-daemon start'"
	print