diff options
author | rh <rh> | 2000-10-21 19:02:32 +0000 |
---|---|---|
committer | rh <rh> | 2000-10-21 19:02:32 +0000 |
commit | ced2d98696e78a2415099802ba759f6095775cb4 (patch) | |
tree | 7604d66e06baa008dcaccbe02dde8a7227843ca6 /net/ispman | |
parent | 4854899e8b9a0091716ba4987ceed29145607662 (diff) | |
download | pkgsrc-ced2d98696e78a2415099802ba759f6095775cb4.tar.gz |
Initial import of ispman-0.5, an ISP management software
Diffstat (limited to 'net/ispman')
-rw-r--r-- | net/ispman/Makefile | 49 | ||||
-rw-r--r-- | net/ispman/files/md5 | 3 | ||||
-rw-r--r-- | net/ispman/files/patch-sum | 3 | ||||
-rw-r--r-- | net/ispman/patches/patch-aa | 339 | ||||
-rw-r--r-- | net/ispman/pkg/COMMENT | 1 | ||||
-rw-r--r-- | net/ispman/pkg/DESCR | 19 | ||||
-rw-r--r-- | net/ispman/pkg/MESSAGE | 27 | ||||
-rw-r--r-- | net/ispman/pkg/PLIST | 71 |
8 files changed, 512 insertions, 0 deletions
diff --git a/net/ispman/Makefile b/net/ispman/Makefile new file mode 100644 index 00000000000..5fdbf869a57 --- /dev/null +++ b/net/ispman/Makefile @@ -0,0 +1,49 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ +# + +DISTNAME= ispman-0.5 +WRKSRC= ${WRKDIR}/ispman +CATEGORIES= net +MASTER_SITES= http://download.sourceforge.net/ispman/ + +MAINTAINER= rh@netbsd.org +HOMEPAGE= http://www.ispman.org/ + +DEPENDS+= openldap>=1.2.11:../../databases/openldap +DEPENDS+= apache>=1.3.14.1:../../www/apache +DEPENDS+= p5-${DISTNAME}:../../net/p5-ispman + +.if !exists(/usr/sbin/postfix) +DEPENDS+= postfix>=19991231pl08:../../mail/postfix +.endif + +USE_PERL5= YES +MESSAGE_FILE= ${WRKDIR}/MESSAGE + +ISPMAN_HTDOCS?= ${PREFIX}/share/ispman/virtual +ISPMAN_IP?= 127.0.0.1 + +do-configure: + cd ${WRKSRC} && ${SED} < install.pl > pkginstall.pl \ + -e 's:@@PREFIX@@:${PREFIX}:g' \ + -e 's:@@HTDOCS@@:${ISPMAN_HTDOCS}:g' \ + -e 's:@@IP@@:${ISPMAN_IP}:g' + +do-build: +.for dir in ispman-utils ispman-web + cd ${WRKSRC}/${dir} && \ + ${RM} -rf `${FIND} . -name CVS -type d -print` && \ + for i in `${FIND} . -type f -print` ; do \ + ${CP} $$i $$i.old && \ + ${SED} <$$i.old >$$i -e 's:/usr/bin/perl:${PERL5}:g' && \ + ${RM} $$i.old ; \ + done +.endfor + +do-install: + cd ${WRKSRC} && ${PERL5} ./pkginstall.pl && \ + ${INSTALL_DATA} ispman.ldif ${PREFIX}/etc/ispman + ${SED} -e 's#@@PREFIX@@#${PREFIX}#g' < ${PKGDIR}/MESSAGE \ + > ${WRKDIR}/MESSAGE + +.include "../../mk/bsd.pkg.mk" diff --git a/net/ispman/files/md5 b/net/ispman/files/md5 new file mode 100644 index 00000000000..7afd474bba7 --- /dev/null +++ b/net/ispman/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ + +MD5 (ispman-0.5.tar.gz) = 6be2cd9a4842a8198f6a06cd36ba040c diff --git a/net/ispman/files/patch-sum b/net/ispman/files/patch-sum new file mode 100644 index 00000000000..2c74457a421 --- /dev/null +++ b/net/ispman/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ + +MD5 (patch-aa) = cb7aa89f3d0c32c38255eb88d58a8add diff --git a/net/ispman/patches/patch-aa b/net/ispman/patches/patch-aa new file mode 100644 index 00000000000..8056555aa9e --- /dev/null +++ b/net/ispman/patches/patch-aa @@ -0,0 +1,339 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ + +--- install.pl.orig Sat Sep 23 20:15:46 2000 ++++ install.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl ++#!@@PREFIX@@/bin/perl + #This is the install utility for ISPMan + #I wrote it origionally for Slashcode some time back, but have modified it to be used with ISPMan. + +@@ -14,7 +14,6 @@ + $HOSTNAME=$ENV{'HOSTNAME'}||`hostname`; + chomp $HOSTNAME; + $PWD=$ENV{'PWD'}; +-system("clear"); + + #this hashref defines sections that we need to configure and their descriptions. + #each key is a section eg ldap, mail, dns etc +@@ -57,7 +56,7 @@ + dns_vars => { + 'description' => qq| + These are DNS (named) specific variables +- will put an empty named.conf.header and named.conf.footer in /etc/ispman/templates ++ will put an empty named.conf.header and named.conf.footer in @@PREFIX@@/etc/ispman/templates + directory for you which you can later change according to your network. + If you already have these files in place then they will be left untouched. + |, +@@ -122,55 +121,55 @@ + }, + + apacheVhostsDir => { +- default => '/home/httpd/virtual', ++ default => '@@HTDOCS@@', + question => "Directory where the VirtualHosts will be kept\nEach domain will have its entry within this directory \nand each subhost will be created underneath that directory", + + }, + + apacheVhostsFile => { +- default => '/etc/httpd/conf/vhosts.conf', ++ default => '@@PREFIX@@/etc/httpd/vhosts.conf', + question => "The file where I should create VirtualHost Entries", + + }, + + apacheVhostsHeader => { +- default => '/etc/ispman/templates/vhosts.conf.header', ++ default => '@@PREFIX@@/etc/ispman/templates/vhosts.conf.header', + question => "I will prepend this file to the VirtualHosts file", + + }, + + apacheVhostsTemplate => { +- default => '/etc/ispman/templates/vhosts.template', ++ default => '@@PREFIX@@/etc/ispman/templates/vhosts.template', + question => "This is the template that will be used when creating config for Virtualhosts\nIf it does not exists then it will be created for you", + + }, + + apacheVhostsIP=> { +- default => '192.168.1.1', ++ default => '@@IP@@', + question => "This is the ip address that all virtual hosts will share", + + }, + + apacheVhostsFooter => { +- default => '/etc/ispman/templates/vhosts.conf.footer', ++ default => '@@PREFIX@@/etc/ispman/templates/vhosts.conf.footer', + question => "I will append this file to the VirtualHosts file", + + }, + + apacheReloadCommand => { +- default => '/etc/rc.d/init.d/httpd reload', ++ default => '@@PREFIX@@/etc/rc.d/apache restart', + question => "Command to reload apache.\nIf this command is present then it will be used instead \nof stoping and starting the daemon", + + }, + + apacheStopCommand => { +- default => '/etc/rc.d/init.d/httpd stop', ++ default => '@@PREFIX@@/etc/rc.d/apache stop', + question => "Command to stop apache", + + }, + + apacheStartCommand => { +- default => '/etc/rc.d/init.d/httpd start', ++ default => '@@PREFIX@@/etc/rc.d/apache start', + question => "Command to start apache", + + }, +@@ -179,7 +178,7 @@ + + + ldapInstallPath => { +- default => '/etc/openldap', ++ default => '@@PREFIX@@/etc/openldap', + question => "path to ldap conf directory.", + }, + +@@ -205,7 +204,7 @@ + }, + + imapHosts => { +- default => 'mail', ++ default => 'localhost', + question => "List all Cyrus mail servers that you have separated by space", + + }, +@@ -261,49 +260,49 @@ + + }, + namedStopCommand => { +- default => '/etc/rc.d/init.d/named stop', ++ default => '/etc/rc.d/named stop', + question => "Command to stop named", + + }, + namedConfFile => { +- default => '/etc/named.conf', ++ default => '/etc/namedb/named.conf', + question => "Configuration file for named", + + }, + + namedStartCommand => { +- default => '/etc/rc.d/init.d/named start', ++ default => '/etc/rc.d/named start', + question => "Command to start named", + + }, + namedConfHeaderFile => { +- default => '/etc/ispman/templates/named.conf.header', ++ default => '@@PREFIX@@/etc/ispman/templates/named.conf.header', + question => "Header file that I should prepend to the generated named.conf", + + }, + + namedConfFooterFile => { +- default => '/etc/ispman/templates/named.conf.footer', ++ default => '@@PREFIX@@/etc/ispman/templates/named.conf.footer', + question => "Header file that I should append to the generated named.conf", + + }, + + dnsMasterEmail => { +- default => 'hostsmaster.yourdomain', ++ default => 'hostmaster.yourdomain', + question => "Emailaddress of the dns master.\nThis is for SOA record", + + }, + + + rootEmail => { +- default => 'root@%%hostname%%', ++ default => 'root@localhost', + question => "Email of the administrator.\nThis email adress is used to send emails if something fails", + + }, + + installDir => { +- default => '/opt/ispman', +- question => "Directory where you want to install ispman components.\nYou may choose to install in on an NFS partition so that you can share the same files with multiple machines.\nIt is recommended to install at /opt/ispman", ++ default => '@@PREFIX@@/share/ispman', ++ question => "Directory where you want to install ispman components.\nYou may choose to install in on an NFS partition so that you can share the same files with multiple machines.\nIt is recommended to install at @@PREFIX@@/share/ispman", + + }, + sleepSecondsBetweenRestart => { +@@ -315,10 +314,10 @@ + }; + + +-if (-e "/etc/ispman/conf/ispman.conf"){ ++if (-e "@@PREFIX@@/etc/ispman/ispman.conf"){ + $ISUPDATE=1; + print "Existing ISPMan installation Exists\nReading defaults from config file\n"; +- do "/etc/ispman/conf/ispman.conf"; ++ do "@@PREFIX@@/etc/ispman/ispman.conf"; + *Config=*ISPMan::Config; + $Config->{'imapHosts'}=join " ", @{$Config->{'imapHosts'}}; + for (keys %$Config){ +@@ -362,12 +361,7 @@ + print getVar($_, 'default'); + print "]: "; + } +- chomp(my $answer=<>); +- if ($answer) { +- $vars->{$_}{'default'}=$answer; +- } else { +- $vars->{$_}{'default'}=getVar($_, 'default'); +- } ++ $vars->{$_}{'default'}=getVar($_, 'default'); + } + + } +@@ -376,10 +370,8 @@ + + + sub write_config { +- system("clear"); +- print "Writting ispman.conf"; +- backup("/etc/ispman/conf/ispman.conf"); +- open ("F", ">/etc/ispman/conf/ispman.conf") or die "Cant open x"; ++ print "Writting ispman.conf.default"; ++ open ("F", ">@@PREFIX@@/etc/ispman/ispman.conf.default") or die "Cant open x"; + print F "package ISPMan;\n"; + + my $key; +@@ -411,16 +403,14 @@ + + + +- print "\nWritting /etc/ispman/templates/domain.ldif.template\n"; ++ print "\nWritting @@PREFIX@@/etc/ispman/templates/domain.ldif.template.default\n"; + print "This template is an ldif template that is used when creating a new domain\n"; + print "This template has probably my site defaults. You may want to change it a bit\n"; + +- backup("/etc/ispman/templates/domain.ldif.template"); +- system("cp install-data/domain.ldif.template.dist /etc/ispman/templates/domain.ldif.template"); ++ system("cp install-data/domain.ldif.template.dist @@PREFIX@@/etc/ispman/templates/domain.ldif.template.default"); + +- print "\nWritting /etc/ispman/templates/vhosts.conf.template\n"; +- backup("/etc/ispman/templates/vhosts.conf.template"); +- system("cp install-data/vhosts.conf.template.dist /etc/ispman/templates/vhosts.conf.template"); ++ print "\nWritting @@PREFIX@@/etc/ispman/templates/vhosts.conf.template.default\n"; ++ system("cp install-data/vhosts.conf.template.dist @@PREFIX@@/etc/ispman/templates/vhosts.conf.template.default"); + } + + +@@ -442,7 +432,7 @@ + print "*"x72, "\n"; + if ($vars_info->{$_}{'optional'}) { + print "You may skip this section to get the default values\nDo you want to set them up? y/n [y] "; +- chomp(my $ans=<>); ++ my $ans="n"; + if ($ans=~/^\s*n/i){ + setDefaults(@{$vars_info->{$_}{'vars'}}); + next; +@@ -450,19 +440,16 @@ + $vars_info->{$_}{'set'}=1; + } + configure(@{$vars_info->{$_}{'vars'}}); +- system("clear"); + } + make_directories(); + write_config(); + } + + sub make_directories{ +- system("clear"); + print "\n\nMaking required directories\n"; + + system(qq| +- mkdir -p /etc/ispman/templates +- mkdir -p /etc/ispman/conf ++ mkdir -p @@PREFIX@@/etc/ispman/templates + mkdir -p $vars->{'installDir'}{'default'} + |); + +@@ -475,22 +462,22 @@ + + + print "Copying cgi-bin to $vars->{'installDir'}{'default'}/ \n"; +- system("cp -a ispman-web/cgi-bin $vars->{'installDir'}{'default'}/"); ++ system("cp -R ispman-web/cgi-bin $vars->{'installDir'}{'default'}/"); + + + print "Copying htdocs to $vars->{'installDir'}{'default'}/ \n"; +- system("cp -a ispman-web/htdocs $vars->{'installDir'}{'default'}/"); ++ system("cp -R ispman-web/htdocs $vars->{'installDir'}{'default'}/"); + + print "Copying bin to $vars->{'installDir'}{'default'}/ \n"; +- system("cp -a ispman-utils/bin $vars->{'installDir'}{'default'}/"); ++ system("cp -R ispman-utils/bin $vars->{'installDir'}{'default'}/"); + + + print "\nMaking dummy named.conf and vhosts.conf header and footer files\n"; + system (qq| +- echo '#this is a named.conf.header file' > $vars->{'namedConfHeaderFile'}{'default'} +- echo '#this is a named.conf.footer file' > $vars->{'namedConfFooterFile'}{'default'} +- echo '#this is a vhosts.conf.header file' > $vars->{'apacheVhostsHeader'}{'default'} +- echo '#this is a vhosts.conf.footer file' > $vars->{'apacheVhostsFooter'}{'default'} ++ echo '#this is a named.conf.header file' > "$vars->{'namedConfHeaderFile'}{'default'}.default" ++ echo '#this is a named.conf.footer file' > "$vars->{'namedConfFooterFile'}{'default'}.default" ++ echo '#this is a vhosts.conf.header file' > "$vars->{'apacheVhostsHeader'}{'default'}.default" ++ echo '#this is a vhosts.conf.footer file' > "$vars->{'apacheVhostsFooter'}{'default'}.default" + |); + + } +@@ -501,7 +488,7 @@ + sub makeldif{ + print "\n\nMaking default ldif file. ispman.ldif\n\n"; + +-open "F", ">ispman.ldif"; ++open "F", ">ispman.ldif.default"; + print F qq|dn: $vars->{'ldapBaseDN'}{'default'} + objectclass: top + objectclass: organisation +@@ -570,13 +557,12 @@ + + sub make_ldap_conf { + print "\n\nShall I make ldap.conf for you? [Y/n]"; +- my $install=<>; chomp $install; ++ my $install="y"; + if ($install =~/^n$/i){ + print "OK\n"; + } else { + print "Installing ldap.conf\n"; +- backup("$vars->{'ldapInstallPath'}{'default'}/ldap.conf"); +- open "F", ">$vars->{'ldapInstallPath'}{'default'}/ldap.conf"; ++ open "F", ">$vars->{'ldapInstallPath'}{'default'}/ldap.conf.ispman"; + print F "host $vars->{'ldapHost'}{'default'}\n"; + print F "base $vars->{'ldapBaseDN'}{'default'}\n"; + print F "pam_login_attribute uid\n"; +@@ -589,13 +575,12 @@ + sub make_slapd_conf { + print "Shall I make slapd.conf for you? [Y/n]"; + +- my $install=<>; chomp $install; ++ my $install="y"; + if ($install =~/^n$/i){ + print "OK\n"; + } else { + +- backup("$vars->{'ldapInstallPath'}{'default'}/slapd.conf"); +- open "F", ">$vars->{'ldapInstallPath'}{'default'}/slapd.conf"; ++ open "F", ">$vars->{'ldapInstallPath'}{'default'}/slapd.conf.ispman"; + print F qq| + include $vars->{'ldapInstallPath'}{'default'}/slapd.at.conf + include $vars->{'ldapInstallPath'}{'default'}/slapd.oc.conf +@@ -625,7 +610,6 @@ + make_slapd_conf(); + install(); + +-system("clear"); + print "Enjoy!\n"; + print qq| + I have created an ldif file ispman.ldif diff --git a/net/ispman/pkg/COMMENT b/net/ispman/pkg/COMMENT new file mode 100644 index 00000000000..944aec3bfa8 --- /dev/null +++ b/net/ispman/pkg/COMMENT @@ -0,0 +1 @@ +ISP management software written in perl diff --git a/net/ispman/pkg/DESCR b/net/ispman/pkg/DESCR new file mode 100644 index 00000000000..fcb59233c4d --- /dev/null +++ b/net/ispman/pkg/DESCR @@ -0,0 +1,19 @@ + ISPman is an ISP management software written in perl, using an LDAP backend +to manage virtual hosts for an ISP. It can be used to manage, DNS, virtual +hosts for apache config, postfix configuration, cyrus mail boxes, proftpd etc. + + ISPMan was written as a management tool for the network at 4unet where +between 30 to 50 domains are hosted and the number is crazily growing. +Managing these domains and their users was a little time consuming, and needed +an Administrator who knows linux and these daemons fluently. Now the help-desk +can easily manage the domains and users. + + LDAP data can be easily replicated site wide, and mail box server can be +scaled from 1 to n as required. An LDAP entry called maildrop tells the SMTP +server (postfix) where to deliver the mail. The SMTP servers can be +loadbalanced with one of many load balancing techniques. The program is +written with scalibility and High availibility in mind. + + This may not be the right software for you if you want to run a small ISP on +a single box or if you want to use this software as an LDAP editor or a DNS +management software by itself. diff --git a/net/ispman/pkg/MESSAGE b/net/ispman/pkg/MESSAGE new file mode 100644 index 00000000000..aec2b54e639 --- /dev/null +++ b/net/ispman/pkg/MESSAGE @@ -0,0 +1,27 @@ +$NetBSD: MESSAGE,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ + +========================================================================== + ISPMan has now been installed on your system. + + Before using this package, copy the default configuration from + '@@PREFIX@@/etc/ispman/ispman.conf.default' to + '@@PREFIX@@/etc/ispman/ispman.conf' (and edit it accordingly). + + You also need to create the appropriate template files in + '@@PREFIX@@/etc/ispman/templates' (or copy them from the + corresponding .default files that can be found there). + + Finally, you need a working apache, cyrus-imapd, postfix, openldap, + PAM, and pam-ldap setup. + + ISPMan configuration templates for openldap can be found under + '@@PREFIX@@/etc/openldap/ldap.conf.ispman' and + '@@PREFIX@@/etc/openldap/slapd.conf.ispman'. Thereafter, you can + initialize openldap by issuing the following command: + + @@PREFIX@@/sbin/ldif2ldbm -i @@PREFIX@@/etc/ispman/ispman.ldif + + On the machine(s) you are running cyrus on, you need to have pam-ldap + and an PAM-enabled cyrus-sasl installed and configured (see the + corresponding packages for more information). +========================================================================== diff --git a/net/ispman/pkg/PLIST b/net/ispman/pkg/PLIST new file mode 100644 index 00000000000..e096bdd6592 --- /dev/null +++ b/net/ispman/pkg/PLIST @@ -0,0 +1,71 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/10/21 19:02:32 rh Exp $ +etc/ispman/ispman.ldif +etc/ispman/ispman.conf.default +etc/ispman/templates/domain.ldif.template.default +etc/ispman/templates/named.conf.footer.default +etc/ispman/templates/named.conf.header.default +etc/ispman/templates/vhosts.conf.footer.default +etc/ispman/templates/vhosts.conf.header.default +etc/ispman/templates/vhosts.conf.template.default +etc/openldap/ldap.conf.ispman +etc/openldap/slapd.conf.ispman +share/ispman/bin/adddomain +share/ispman/bin/adduser +share/ispman/bin/addvhost +share/ispman/bin/deletedomain +share/ispman/bin/deletevhost +share/ispman/bin/dnsshow +share/ispman/bin/ldap2named +share/ispman/bin/ldap2vhosts +share/ispman/bin/mailproxy +share/ispman/bin/senduseraliases +share/ispman/bin/showdomains +share/ispman/bin/showusers +share/ispman/cgi-bin/ispdump.cgi +share/ispman/cgi-bin/ispman.cgi +share/ispman/cgi-bin/tmpl/addVhost.tmpl +share/ispman/cgi-bin/tmpl/adduser.tmpl +share/ispman/cgi-bin/tmpl/editVhost.tmpl +share/ispman/cgi-bin/tmpl/edituser.tmpl +share/ispman/cgi-bin/tmpl/headers.tmpl +share/ispman/cgi-bin/tmpl/index.tmpl +share/ispman/cgi-bin/tmpl/ispman.tmpl +share/ispman/cgi-bin/tmpl/menu.tmpl +share/ispman/htdocs/about.html +share/ispman/htdocs/gfx/bg_blue.gif +share/ispman/htdocs/gfx/bg_grey.gif +share/ispman/htdocs/gfx/bg_lila.gif +share/ispman/htdocs/gfx/bg_menu.gif +share/ispman/htdocs/gfx/but/but_apply_chg_0.gif +share/ispman/htdocs/gfx/but/but_apply_chg_1.gif +share/ispman/htdocs/gfx/but/but_create_entry_0.gif +share/ispman/htdocs/gfx/but/but_create_entry_1.gif +share/ispman/htdocs/gfx/but/but_del_entry_0.gif +share/ispman/htdocs/gfx/but/but_del_entry_1.gif +share/ispman/htdocs/gfx/but/but_discard_chg_0.gif +share/ispman/htdocs/gfx/but/but_discard_chg_1.gif +share/ispman/htdocs/gfx/but/but_new_entry_0.gif +share/ispman/htdocs/gfx/but/but_new_entry_1.gif +share/ispman/htdocs/gfx/but/but_search_0.gif +share/ispman/htdocs/gfx/but/but_search_1.gif +share/ispman/htdocs/gfx/false.gif +share/ispman/htdocs/gfx/ispmgr.gif +share/ispman/htdocs/gfx/ispmgr_logo.gif +share/ispman/htdocs/gfx/minus.gif +share/ispman/htdocs/gfx/pixeltrans.gif +share/ispman/htdocs/gfx/plus.gif +share/ispman/htdocs/gfx/true.gif +share/ispman/htdocs/index.html +share/ispman/htdocs/ispman_menu.html +share/ispman/htdocs/js/list.js +share/ispman/htdocs/title.html +@dirrm share/ispman/htdocs/js +@dirrm share/ispman/htdocs/gfx/but +@dirrm share/ispman/htdocs/gfx +@dirrm share/ispman/htdocs +@dirrm share/ispman/cgi-bin/tmpl +@dirrm share/ispman/cgi-bin +@dirrm share/ispman/bin +@dirrm share/ispman +@dirrm etc/ispman/templates +@dirrm etc/ispman |