diff options
| author | Valery Kartel <valery.kartel@gmail.com> | 2015-09-24 16:17:31 +0300 |
|---|---|---|
| committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-09-29 16:13:11 +0200 |
| commit | fa6505dc69a2a6945324744d8134de0b186be808 (patch) | |
| tree | 51ed8fedb90f372a5b783b2a2a7d2af6f7f890b2 /testing/csync2/csync2.post-install | |
| parent | 48cf8ee4d00068967848c3c9deb33b6c996c1697 (diff) | |
| download | aports-fa6505dc69a2a6945324744d8134de0b186be808.tar.bz2 aports-fa6505dc69a2a6945324744d8134de0b186be808.tar.xz | |
testing/csync2: upgrade to 2.0
Diffstat (limited to 'testing/csync2/csync2.post-install')
| -rw-r--r-- | testing/csync2/csync2.post-install | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/csync2/csync2.post-install b/testing/csync2/csync2.post-install new file mode 100644 index 0000000000..3c2ecc1ecf --- /dev/null +++ b/testing/csync2/csync2.post-install @@ -0,0 +1,24 @@ +#!/bin/sh + +SSL="/etc/csync2/csync2_ssl_" +SERV="/etc/services" +INETD="/etc/inetd.conf" + +if [ ! -f ${SSL}key.pem -o ! -f ${SSL}cert.pem ]; then + openssl genrsa -out ${SSL}key.pem 1024 &> /dev/null + yes '' | openssl req -new -key ${SSL}key.pem -out ${SSL}cert.csr &> /dev/null + openssl x509 -req -days 3600 -in ${SSL}cert.csr -out ${SSL}cert.pem -signkey ${SSL}key.pem &> /dev/null + rm ${SSL}cert.csr +fi + +if [ ! -f ${SERV} ]; then + touch ${SERV} +fi +grep -q csync2 ${SERV} || echo -e "csync2\t\t30865/tcp" >> ${SERV} + +if [ ! -f ${INETD} ]; then + touch ${INETD} +fi +grep -q csync2 ${INETD} || echo "csync2 stream tcp nowait root /usr/sbin/csync2 csync2 -i" >> ${INETD} + +exit 0 |
