# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=8 DESCRIPTION="A web-based control panel for web hosting servers" HOMEPAGE="http://registeredhosting.ca" SRC_URI="https://registeredhosting.ca/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" #IUSE="" #RESTRICT="fetch" inherit ssl-cert RDEPEND=" mail-mta/postfix[postgres,sasl,ssl] dev-lang/php[cgi,curl,mysql,postgres,unicode] www-servers/apache[suexec,apache2_modules_proxy,apache2_modules_proxy_http] net-dns/pdns[postgres] virtual/mysql dev-db/postgresql net-libs/courier-authlib[postgres] net-mail/courier-imap[fam] net-mail/dovecot[postgres,sieve,managesieve] dev-libs/cyrus-sasl[postgres] app-admin/sudo mail-filter/amavisd-new[razor,dkim] sys-apps/shadow app-antivirus/clamav www-misc/awstats app-admin/logrotate mail-client/roundcube[postgres] mail-filter/spamassassin[cron] dev-db/phpmyadmin dev-db/opendbx[postgres] net-firewall/iptables net-misc/ntp net-analyzer/fail2ban mail-filter/spf-engine app-crypt/certbot mail-client/mailx mail-filter/razor mail-filter/opendkim[opendbx] mail-filter/opendmarc " pkg_preinst() { useradd -MU ghostpanel } src_install() { dodir /var/www/ghostpanel fperms 755 /var/www/ghostpanel fowners ghostpanel:ghostpanel /var/www/ghostpanel cp -R ${S}/* ${D}/var/www/ghostpanel/ dodir /etc/apache2/ghostpanel fperms 755 /etc/apache2/ghostpanel fowners apache /etc/apache2/ghostpanel cp ${S}/etc/apache/000_ghostpanel.conf ${D}/etc/apache2/ghostpanel/ dodir /etc/apache2/ghostpanel/includes fperms 755 /etc/apache2/ghostpanel/includes fowners apache /etc/apache2/ghostpanel/includes cp ${S}/etc/apache/includes/* ${D}/etc/apache2/ghostpanel/includes dodir /etc/apache2/modules.d cp ${S}/etc/apache/99_ghostpanel.conf ${D}/etc/apache2/modules.d/99_ghostpanel.conf dodir /etc/ssl/ghostpanel fperms 755 /etc/ssl/ghostpanel dodir /etc/logrotate.d cp ${S}/etc/logrotate.d/ghostpanel ${D}/etc/logrotate.d/ dodir /etc/cron.daily cp ${S}/etc/cron.daily/ghostpanel.cron ${D}/etc/cron.daily } pkg_postinst() { chown -R ghostpanel:ghostpanel /var/www/ghostpanel find /var/www/ghostpanel -type f -exec chmod 644 '{}' \; find /var/www/ghostpanel -type d -exec chmod 755 '{}' \; chmod 755 /var/www/ghostpanel/bin/* chmod 700 /var/www/ghostpanel/cgi-bin/php chmod 644 /etc/postfix*/* chmod 755 /etc/cron.daily/ghostpanel.cron if [[ ! -e "${ROOT}/etc/ssl/ghostpanel/server.crt" ]]; then SSL_DAYS="${SSL_DAYS:-730}" SSL_BITS="${SSL_BITS:-4096}" SSL_COUNTRY="${SSL_COUNTRY:-CA}" SSL_STATE="${SSL_STATE:-Alberta}" SSL_LOCALITY="${SSL_LOCALITY:-Calgary}" SSL_ORGANIZATION="${SSL_ORGANIZATION:-GHostPanel}" SSL_UNIT="${SSL_UNIT:-For Testing Purposes Only}" SSL_COMMONNAME="${SSL_COMMONNAME:-localhost}" SSL_EMAIL="${SSL_EMAIL:-root@localhost}" install_cert /etc/ssl/ghostpanel/server fi; }