Revize 2481
Přidáno uživatelem Ondřej Fibich před více než 9 roky(ů)
freenetis/tags/1.1.12/application/vendors/deb/freenetis/changelog | ||
---|---|---|
freenetis (1.1.12) stable; urgency=hight
|
||
* Support for new lbilling NFX VoIP API
|
||
* Fix hybrid method issue on PHP 5.6 (Jessie)
|
||
* Fix sorting by type in the table of members
|
||
* Added validator for disabling filling dot in database name during setup
|
||
* VoIP settings fix that allows to not fill leaved numbers
|
||
* Fix the device form state change on a device template add through pop-up
|
||
* Filter for bank account owner in bank account table
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 04 Jun 2015 22:08:34 +0200
|
||
|
||
freenetis (1.1.11) stable; urgency=hight
|
||
* Double-entry transfer may be added to 684000 account by user
|
||
* Improved double-entry account lists in forms that allows to add new transfer
|
||
* New filter for member ID in users and member interrupts grids
|
||
* Fix win1250 encoding issue in CSV export
|
||
* Fix DEB package dependency to CRON and locales
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Fri, 15 May 2015 19:39:51 +0200
|
||
|
||
freenetis (1.1.10) stable; urgency=hight
|
||
* New configuration option that allows duplicates in phone and e-mail contacts
|
||
* New variable symbol generator that generates member ID
|
||
* Member table displays member interrupt info in member type column
|
||
* New form for editing of bank account that is not owned by association
|
||
* New form for assigning of unidentified transfer to any account
|
||
* Member ID is displayed in membership interrupt table in member column
|
||
* Fixes of members fee recalculation if deduct day is last day in month
|
||
* Fixes issue with hidden bank accounts that do not have owner
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 16 Apr 2015 22:45:27 +0200
|
||
|
||
freenetis (1.1.9) stable; urgency=hight
|
||
* Fix release of invalid DEB package
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 03 Mar 2015 18:18:18 +0100
|
||
|
||
freenetis (1.1.8) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #956: Add fee fix if it ends in '9999-12-31'
|
||
* Fixes #960: Cannot set default allow subnets count
|
||
* Fixes #962: Allow subnets count not set during self-registration of member
|
||
* Fixes #963: Export to PDF in PHP 5.5
|
||
* Fixes #964: Link to request in user profile
|
||
* Fixes #966: Sorting in transfers
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 03 Mar 2015 17:18:18 +0100
|
||
|
||
freenetis (1.1.7) stable; urgency=low
|
||
* Fix release
|
||
* Fixes #895: Notification activation for members filtered by stored query
|
||
* Fixes #913: Fulltext search weights fix for important results
|
||
* Fixes #917: Count of IP addresses in IP grid
|
||
* Fixes #918: Monitoring activation for filtered devices
|
||
* Closes #953: Support for deposit payment by cash removed from FIO importer
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 29 Jan 2015 17:27:11 +0100
|
||
|
||
freenetis (1.1.6) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #894: Member name length limitation extended
|
||
* Fixes #899: Invalid prefilled value in link dialog
|
||
* Fixes #900: Possibility to add existing wireless interface to air link
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Wed, 19 Mar 2014 23:19:06 +0100
|
||
|
||
freenetis (1.1.5) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #885: Unidentified payments filter
|
||
* Fixes #893: Pre-fill of form for approving of a connection request
|
||
* Implements #882: Determining of MAC from RB/Linux in hybrid networks
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 04 Mar 2014 23:29:40 +0100
|
||
|
||
freenetis (1.1.4) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #880: Fixes filter initialization due to forgotten JS debug
|
||
* Fixes #881: Filter initialization if field has no class
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 11 Feb 2014 15:12:02 +0100
|
||
|
||
freenetis (1.1.3) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #876: Fixes clearing of filter form values after filter sending
|
||
* Fixes #877: Bank account settings change breaks bank statement import
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 06 Feb 2014 13:15:29 +0100
|
||
|
||
freenetis (1.1.2) stable; urgency=hight
|
||
* Fix release
|
||
* Fixes #868: member statistics on no filtered results
|
||
* Fixes #869: datepicker in SMS messages date filter
|
||
* Fixes #871: dialog loading in IE7
|
||
* Fixes #873: invalid rebuilding of filter
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 04 Feb 2014 22:21:11 +0100
|
||
|
||
freenetis (1.1.1) stable; urgency=hight
|
||
* Fix release (#862: Activation of user notification message)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Fri, 24 Jan 2014 18:45:31 +0100
|
||
|
||
freenetis (1.1.0) stable; urgency=low
|
||
* First stable version of 1.1
|
||
* Key features: <http://www.freenetis.org/freenetis-1-1-key-features>
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Fri, 17 Jan 2014 11:10:21 +0100
|
||
|
||
freenetis (1.0.12) stable; urgency=hight
|
||
* Fix release
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 09 Jul 2013 15:12:00 +0100
|
||
|
||
freenetis (1.0.11) stable; urgency=hight
|
||
* Fix release (#684)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 09 Jul 2013 15:08:00 +0100
|
||
|
||
freenetis (1.0.10) stable; urgency=hight
|
||
* Fix release (#36, #615)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 09 Jul 2013 14:37:00 +0100
|
||
|
||
freenetis (1.0.9) stable; urgency=hight
|
||
* Fix release (#488, #508, #569)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Fri, 06 Jun 2013 14:06:00 +0100
|
||
|
||
freenetis (1.0.8) stable; urgency=hight
|
||
* Fix release (#454, #470, #460)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Mon, 21 Jan 2013 11:52:00 +0100
|
||
|
||
freenetis (1.0.7) stable; urgency=hight
|
||
* Fix release (#416, #436, #445, #452)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Wed, 16 Jan 2013 19:09:56 +0100
|
||
|
||
freenetis (1.0.6) stable; urgency=hight
|
||
* Fix release (#358, #443)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 03 Jan 2013 17:41:28 +0100
|
||
|
||
freenetis (1.0.5) stable; urgency=hight
|
||
* Fix release (#254, #294, #396, #399, #402, #409, #410)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Wed, 31 Oct 2012 00:35:25 +0100
|
||
|
||
freenetis (1.0.4) stable; urgency=hight
|
||
* Fix release (#366, #367, #373, #374, #376, #377, #378, #380, #383, #384)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 27 Sep 2012 21:24:48 +0200
|
||
|
||
freenetis (1.0.3) stable; urgency=hight
|
||
* Fix release (#363, #355, #358, #362, #361)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 18 Sep 2012 19:33:24 +0200
|
||
|
||
freenetis (1.0.2) stable; urgency=hight
|
||
* Fix release (#336, #334, #331, #329, #325, #324, #321, #320, #297)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Sat, 15 Sep 2012 09:01:17 +0200
|
||
|
||
freenetis (1.0.1) stable; urgency=hight
|
||
* Fix release (#296, #298, #299, #305, #309, #310)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 28 Aug 2012 09:28:44 +0200
|
||
|
||
freenetis (1.0.0) stable; urgency=hight
|
||
* Official release 1.0.0
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 23 Aug 2012 10:37:46 +0200
|
||
|
||
freenetis (1.0.0~rc13) unstable; urgency=low
|
||
* Restrict local installation (#289)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 21 Aug 2012 08:37:46 +0200
|
||
|
||
freenetis (1.0.0~rc7) unstable; urgency=low
|
||
* Changes in interface of ifaces
|
||
* Several bug fixes
|
||
* Fixes dependencies
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Mon, 13 Aug 2012 11:19:41 +0200
|
||
|
||
freenetis (1.0.0~rc6) unstable; urgency=low
|
||
* Added support for redirection and server aliases in apache config (#246)
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Mon, 06 Aug 2012 15:49:56 +0200
|
||
|
||
freenetis (1.0.0~rc1) unstable; urgency=low
|
||
* First official RC release
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Fri, 03 Aug 2012 16:43:44 +0200
|
||
|
||
freenetis (1.0.0~beta7) unstable; urgency=low
|
||
* Support for monitoring package
|
||
* Device templates import/export functionality
|
||
* Several bug fixes
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 02 Aug 2012 16:02:42 +0200
|
||
|
||
freenetis (1.0.0~beta6) unstable; urgency=low
|
||
* Improvements in DEB package
|
||
* Improvements in installation
|
||
* Several bug fixes
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Thu, 02 Aug 2012 16:02:42 +0200
|
||
|
||
freenetis (1.0.0~beta5) unstable; urgency=low
|
||
* Added new mechanism for database upgrades and version system (#146)
|
||
* Several bug fixes
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Wed, 01 Aug 2012 17:05:25 +0200
|
||
|
||
freenetis (1.0.0~beta2) unstable; urgency=low
|
||
* Second official beta release - all functionality included in this release
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 31 Jul 2012 12:54:59 +0200
|
||
|
||
freenetis (1.0.0~beta1) unstable; urgency=low
|
||
* First official beta release
|
||
-- Ondrej Fibich <ondrej.fibich@gmail.com> Tue, 26 Jun 2012 21:28:47 +0200
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/control | ||
---|---|---|
Priority: optional
|
||
Section: web
|
||
Pre-Depends: debconf (>= 0.5) | debconf-2.0
|
||
Depends: coreutils (>= 6.10-6), wget (>= 1.11-4.1), grep (>= 2.5.3), apache2, php5, php5-curl, libapache2-mod-php5, php5-mysql | php5-mysqli, mysql-client, php5-mcrypt, php5-gd, php5-snmp, cron | anacron | cron-daemon, locales
|
||
Suggests: mysql-server (>= 5.0.0), mysql-client
|
||
Architecture: all
|
||
Maintainer: Ondrej Fibich <ondrej.fibich@gmail.com>
|
||
Homepage: http://www.freenetis.org
|
||
Description: Information system for managing non-profit networks
|
||
FreenetIS is multilingual information system for managing non-profit networks.
|
||
.
|
||
It is capable to manage:
|
||
- users and their groups;
|
||
- double-entry accounting system (payments, double-entry transfers,
|
||
bank transfers, accounts, bank accounts, cash flow);
|
||
- network infrastructure (devices, segments, interfaces, IP addresses,
|
||
subnets, VLANs, VLAN interfaces, bridges, ports);
|
||
- network management (device monitoring, DHCP servers configuration,
|
||
traffic statistics, QoS);
|
||
- notifications of users (traffic redirection, e-mail messages, SMS messages);
|
||
- work reporting of active users and work approval;
|
||
- lists of calls and billing of VoIP;
|
||
- etc.
|
||
Description-cs.UTF-8: Informační systém pro počítačové sítě, provozované neziskovou organizací
|
||
FreenetIS je vícejazyčný informační systém pro počítačové sítě, provozované
|
||
neziskovou organizací.
|
||
.
|
||
Je schopen spravovat:
|
||
- uživatele a jejich skupiny;
|
||
- podvojné účty organizace (platby, podvojné převody, bankovní převody,
|
||
bankovní účty, cash flow);
|
||
- síťová infrastruktura (zařízení, segmenty, rozhraní, IP adresy, podsítě,
|
||
VLANy, VLAN rozhraní, bridge, porty);
|
||
- správa sítě (monitorování zařízení, konfigurace DHCP serverů,
|
||
statistiky provozu, QoS);
|
||
- upozorňování uživatelů (přesměrování provozu, e-mailové zprávy, SMS zprávy);
|
||
- práce aktivních uživatelů a jejich schvalování;
|
||
- výpisy volání a placení VoIP po napojení na ústřednu;
|
||
- atd.
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/debianization.sh | ||
---|---|---|
#!/bin/sh
|
||
################################################################################
|
||
# Script for debianization of FreenetIS base package
|
||
# (c) Ondrej Fibich, 2012
|
||
#
|
||
# Takes two arguments (version of package - FreenetIS and debian version).
|
||
#
|
||
################################################################################
|
||
|
||
if [ $# -ne 2 ]; then
|
||
echo "Wrong arg count.. Terminating"
|
||
exit 1
|
||
fi
|
||
|
||
NAME=freenetis
|
||
VERSION=$1
|
||
DEBIAN=$2
|
||
|
||
# create dirs ##################################################################
|
||
mkdir ../deb_packages/tmp
|
||
cd ../deb_packages/tmp
|
||
|
||
mkdir -m 755 DEBIAN
|
||
mkdir -m 755 usr
|
||
mkdir -m 755 usr/share
|
||
mkdir -m 755 usr/share/${NAME}
|
||
mkdir -m 755 usr/share/doc
|
||
mkdir -m 755 usr/share/doc/${NAME}
|
||
mkdir -m 755 etc
|
||
mkdir -m 755 etc/freenetis
|
||
mkdir -m 755 etc/freenetis/https
|
||
|
||
# copy content of package ######################################################
|
||
|
||
cd ..
|
||
tar -zcvf /tmp/${NAME}_packaging.tar.gz ../../../../ 1>/dev/null
|
||
|
||
if [ $? -ne 0 ]; then
|
||
echo "error during packaging"
|
||
exit 2
|
||
fi
|
||
|
||
cd tmp/usr/share/${NAME}
|
||
|
||
tar -xvf /tmp/${NAME}_packaging.tar.gz 1>/dev/null
|
||
|
||
if [ $? -ne 0 ]; then
|
||
echo "error during unpackaging"
|
||
exit 3
|
||
fi
|
||
|
||
rm /tmp/${NAME}_packaging.tar.gz
|
||
|
||
cd ../../../
|
||
|
||
# remove dev parts of FN
|
||
rm -rf usr/share/${NAME}/application/vendors/deb
|
||
rm -rf usr/share/${NAME}/application/vendors/unit_tester
|
||
rm -rf usr/share/${NAME}/application/vendors/redirection
|
||
rm -rf usr/share/${NAME}/application/vendors/monitoring
|
||
rm -rf usr/share/${NAME}/application/vendors/qos
|
||
rm -rf usr/share/${NAME}/application/vendors/ssh-keys
|
||
rm -rf usr/share/${NAME}/application/vendors/dhcp
|
||
rm -rf usr/share/${NAME}/application/vendors/axo_doc
|
||
rm -rf usr/share/${NAME}/application/controllers/unit_tester.php
|
||
rm -rf usr/share/${NAME}/application/views/unit_tester
|
||
rm -rf usr/share/${NAME}/application/vendors/phpwhois/testsuite.php
|
||
# remove hidden
|
||
rm -rf usr/share/${NAME}/.htaccess
|
||
rm -rf usr/share/${NAME}/config.php
|
||
rm -rf usr/share/${NAME}/upload/*
|
||
rm -rf usr/share/${NAME}/logs
|
||
rm -rf usr/share/${NAME}/doc
|
||
rm -rf usr/share/${NAME}/tests
|
||
# remove .svn
|
||
rm -rf `find usr/share/${NAME} -type d -name .svn`
|
||
|
||
# change permissions
|
||
find usr/share/${NAME} -type d -exec chmod 0755 {} \;
|
||
find usr/share/${NAME} -type f -exec chmod 0644 {} \;
|
||
find usr/share/${NAME} -type f -name *.pl -exec chmod +x {} \;
|
||
|
||
# copy config file
|
||
cp ../../freenetis/freenetis.conf etc/freenetis/
|
||
chmod 0644 etc/freenetis/freenetis.conf
|
||
|
||
# doc ##########################################################################
|
||
|
||
# change log
|
||
cat ../../${NAME}/changelog >> usr/share/doc/${NAME}/changelog
|
||
|
||
# debian change log is same
|
||
cp usr/share/doc/${NAME}/changelog usr/share/doc/${NAME}/changelog.Debian
|
||
|
||
# copyright
|
||
echo "This package was debianized by Ondrej Fibich <ondrej.fibich@gmail.com> on `date -R`" >> usr/share/doc/${NAME}/copyright
|
||
echo "It was downloaded from <http://freenetis.org/>\n" >> usr/share/doc/${NAME}/copyright
|
||
echo "Copyright:" >> usr/share/doc/${NAME}/copyright
|
||
cat ../../../../../AUTHORS >> usr/share/doc/${NAME}/copyright
|
||
echo "\nLicense:" >> usr/share/doc/${NAME}/copyright
|
||
cat ../../../../../COPYING >> usr/share/doc/${NAME}/copyright
|
||
echo "\nOn Debian systems, the complete text of the GNU General" >> usr/share/doc/${NAME}/copyright
|
||
echo "Public License can be found in \`/usr/share/common-licenses/GPL-3'.\n" >> usr/share/doc/${NAME}/copyright
|
||
echo -n "The Debian packaging is (C) `date +%Y`, Ondrej Fibich <ondrej.fibich@gmail.com> and" >> usr/share/doc/${NAME}/copyright
|
||
echo " it is licensed under the GPL, see above.\n" >> usr/share/doc/${NAME}/copyright
|
||
|
||
# rights
|
||
chmod 644 usr/share/doc/${NAME}/changelog usr/share/doc/${NAME}/changelog.Debian \
|
||
usr/share/doc/${NAME}/copyright
|
||
|
||
# compress doc
|
||
gzip --best usr/share/doc/${NAME}/changelog
|
||
gzip --best usr/share/doc/${NAME}/changelog.Debian
|
||
|
||
# count size
|
||
SIZE=`du -s usr | cut -f1`
|
||
|
||
# calculate checksum ###########################################################
|
||
|
||
find * -type f ! -regex '^DEBIAN/.*' -exec md5sum {} \; >> DEBIAN/md5sums
|
||
|
||
# create info files ############################################################
|
||
|
||
# create package info
|
||
|
||
echo "Package: ${NAME}" >> DEBIAN/control
|
||
echo "Version: ${VERSION}-${DEBIAN}" >> DEBIAN/control
|
||
echo "Installed-Size: ${SIZE}" >> DEBIAN/control
|
||
cat ../../${NAME}/control >> DEBIAN/control
|
||
|
||
# scripts ######################################################################
|
||
|
||
cp -a -f ../../${NAME}/preinst DEBIAN/preinst
|
||
if [ $DEBIAN = "jessie" ]; then
|
||
cp -a -f ../../${NAME}/postinst.jessie DEBIAN/postinst
|
||
else
|
||
cp -a -f ../../${NAME}/postinst DEBIAN/postinst
|
||
fi
|
||
cp -a -f ../../${NAME}/prerm DEBIAN/prerm
|
||
if [ $DEBIAN = "jessie" ]; then
|
||
cp -a -f ../../${NAME}/postrm.jessie DEBIAN/postrm
|
||
else
|
||
cp -a -f ../../${NAME}/postrm DEBIAN/postrm
|
||
fi
|
||
cp -a -f ../../${NAME}/templates DEBIAN/templates
|
||
cp -a -f ../../${NAME}/config DEBIAN/config
|
||
cp -a -f ../../${NAME}/conffiles DEBIAN/conffiles
|
||
|
||
chmod 755 DEBIAN/preinst DEBIAN/postinst DEBIAN/prerm DEBIAN/postrm DEBIAN/config
|
||
chmod 0644 DEBIAN/templates DEBIAN/conffiles DEBIAN/md5sums
|
||
|
||
# create deb ###################################################################
|
||
|
||
# change owner of files to root (security)
|
||
cd ..
|
||
fakeroot chown -hR root:root *
|
||
cd tmp
|
||
|
||
# make package
|
||
cd ..
|
||
fakeroot dpkg-deb -b tmp ${NAME}_${VERSION}+${DEBIAN}.deb
|
||
|
||
# clean-up mess ################################################################
|
||
|
||
# clean
|
||
rm -rf tmp
|
||
freenetis/tags/1.1.12/application/vendors/deb/freenetis/postinst.jessie | ||
---|---|---|
#!/bin/bash
|
||
# FreenetIS DEB: actions after installing of package
|
||
|
||
set -e
|
||
. /usr/share/debconf/confmodule
|
||
|
||
SERVER=apache2
|
||
CONFIGFILE=/etc/freenetis/freenetis.conf
|
||
CONFIG_SAMPLE_PHP=/usr/share/freenetis/config-sample.php
|
||
|
||
# Generate config file, if it doesn’t exist.
|
||
# An alternative is to copy in a template
|
||
# file from elsewhere.
|
||
|
||
if [ ! -e $CONFIGFILE ]; then
|
||
mkdir /etc/freenetis/
|
||
echo "# Config file for FreenetIS" > $CONFIGFILE
|
||
echo "SERVERNAME=\"localhost/freenetis\"" >> $CONFIGFILE
|
||
echo "PROTOCOL=\"http\"" >> $CONFIGFILE
|
||
fi
|
||
|
||
# load configure file
|
||
. $CONFIGFILE || true
|
||
|
||
# Version 1.1 is located in /usr/share/freenetis but previous versions were
|
||
# located in /var/www/freeenetis, we try to use old config files if they are
|
||
# exists. The old configuration must not replace new configuration!
|
||
|
||
OLD_PATH=/var/www/freenetis
|
||
CURRENT_PATH=/usr/share/freenetis
|
||
|
||
# DB config
|
||
if [ -f "${OLD_PATH}/config.php" ] && [ ! -f "${CURRENT_PATH}/config.php" ]; then
|
||
echo "Copying old DB configuration from ${OLD_PATH}/config.php file"
|
||
cp "${OLD_PATH}/config.php" "${CURRENT_PATH}/config.php"
|
||
fi
|
||
|
||
# .htaccess
|
||
if [ -f "${OLD_PATH}/.htaccess" ] && [ ! -f "${CURRENT_PATH}/.htaccess" ]; then
|
||
echo "Copying old apache configuration from ${OLD_PATH}/.htaccess file"
|
||
cp "${OLD_PATH}/.htaccess" "${CURRENT_PATH}/.htaccess"
|
||
chmod 0666 "${CURRENT_PATH}/.htaccess" || true
|
||
fi
|
||
|
||
# Substitute in the values from the debconf db.
|
||
# There are obvious optimizations possible here.
|
||
# The cp before the sed ensures we do not mess up
|
||
# the config file’s ownership and permissions.
|
||
|
||
db_get freenetis/server_type
|
||
SERVER_TYPE="$RET"
|
||
|
||
db_get freenetis/servername
|
||
SERVERNAME="$RET"
|
||
|
||
db_get freenetis/protocol
|
||
PROTOCOL="$RET"
|
||
|
||
db_get freenetis/https_add_redir
|
||
HTTPS_ADD_REDIR="$RET"
|
||
|
||
cp -a -f $CONFIGFILE $CONFIGFILE.tmp
|
||
|
||
# h@ck for enable reloading vars from config file
|
||
db_set freenetis/hack_reload true
|
||
db_go || true
|
||
|
||
# If the admin deleted or commented some variables but then set
|
||
# them via debconf, (re-)add them to the conffile.
|
||
|
||
test -z "$SERVERNAME" || grep -Eq '^ *SERVERNAME=' $CONFIGFILE || echo "SERVERNAME=" >> $CONFIGFILE
|
||
test -z "$PROTOCOL" || grep -Eq '^ *PROTOCOL=' $CONFIGFILE || echo "PROTOCOL=" >> $CONFIGFILE
|
||
|
||
SERVERNAME_ESCAPED="${SERVERNAME//\//\\/}"
|
||
sed -e "s/^ *SERVERNAME=.*/SERVERNAME=\"$SERVERNAME_ESCAPED\"/" \
|
||
-e "s/^ *PROTOCOL=.*/PROTOCOL=\"$PROTOCOL\"/" < $CONFIGFILE > $CONFIGFILE.tmp
|
||
|
||
mv -f $CONFIGFILE.tmp $CONFIGFILE
|
||
|
||
# check server name
|
||
if [ -z "$SERVERNAME" ]; then
|
||
echo "Wrong server name, configuration failed!"
|
||
exit 3
|
||
fi
|
||
|
||
# check protocol
|
||
if [ -z "$PROTOCOL" ]; then
|
||
echo "Wrong protocol, configuration failed!"
|
||
exit 3
|
||
fi
|
||
|
||
# check SSL keys
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
|
||
if [ ! -f "$SSL_CERTIFICATE_FILE" ]; then
|
||
echo "SSL certificate file and key file not set properly."
|
||
echo "File $SSL_CERTIFICATE_FILE does not exists"
|
||
echo " => switching protocol from https to http"
|
||
PROTOCOL="http"
|
||
fi
|
||
|
||
if [ ! -f "$SSL_CERTIFICATE_KEY_FILE" ]; then
|
||
echo "SSL certificate file and key file not set properly."
|
||
echo "File $SSL_CERTIFICATE_KEY_FILE does not exists"
|
||
echo " => switching protocol from https to http"
|
||
PROTOCOL="http"
|
||
fi
|
||
|
||
fi
|
||
|
||
# Make post install things
|
||
|
||
# 0) Access rights to some directories
|
||
chmod ugo+w /usr/share/freenetis
|
||
chmod ugo+w /usr/share/freenetis/upload
|
||
mkdir -m 0777 /usr/share/freenetis/logs 2>/dev/null || true
|
||
|
||
# 1) Apache config
|
||
echo "Preparing Apache"
|
||
|
||
A2CF=/etc/$SERVER/conf-enabled/freenetis.conf
|
||
|
||
# activate redirection
|
||
a2enmod rewrite > /dev/null
|
||
|
||
# activate SSL if https selected
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
a2enmod ssl > /dev/null
|
||
fi
|
||
|
||
# PHP settings
|
||
php_settings="
|
||
# PHP settings
|
||
php_flag register_globals Off
|
||
php_flag magic_quotes_gpc Off
|
||
php_flag magic_quotes_runtime Off
|
||
php_flag file_uploads On
|
||
php_flag short_open_tag On
|
||
# large inputs (fixes #358, #410)
|
||
php_value max_input_vars 100000
|
||
php_admin_value suhosin.post.max_vars 100000
|
||
php_admin_value suhosin.request.max_vars 100000"
|
||
|
||
# make config for FN
|
||
if [ "$SERVER_TYPE" = localhost ]; then
|
||
|
||
echo "Alias /freenetis /usr/share/freenetis" > $A2CF
|
||
echo "<Directory /usr/share/freenetis>" >> $A2CF
|
||
echo " Options Indexes FollowSymLinks MultiViews" >> $A2CF
|
||
echo " AllowOverride All" >> $A2CF
|
||
echo " Order allow,deny" >> $A2CF
|
||
echo " allow from all" >> $A2CF
|
||
echo " ${php_settings}" >> $A2CF
|
||
echo "</Directory>" >> $A2CF
|
||
|
||
else
|
||
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
echo "NameVirtualHost *:443" > $A2CF
|
||
echo "<VirtualHost *:443>" >> $A2CF
|
||
else
|
||
echo "NameVirtualHost *:80" > $A2CF
|
||
echo "<VirtualHost *:80>" >> $A2CF
|
||
fi
|
||
|
||
echo " ServerName ${SERVERNAME}" >> $A2CF
|
||
echo " ServerAlias www.${SERVERNAME}" >> $A2CF
|
||
echo " DocumentRoot /usr/share/freenetis" >> $A2CF
|
||
echo " <Directory /usr/share/freenetis>" >> $A2CF
|
||
echo " Options Indexes FollowSymLinks MultiViews" >> $A2CF
|
||
echo " AllowOverride All" >> $A2CF
|
||
echo " Order allow,deny" >> $A2CF
|
||
echo " allow from all" >> $A2CF
|
||
echo " ${php_settings}" >> $A2CF
|
||
echo " </Directory>" >> $A2CF
|
||
echo " ErrorLog $ERROR_LOG_FILE" >> $A2CF
|
||
echo " CustomLog $CUSTOM_LOG_FILE common" >> $A2CF
|
||
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
echo " SSLEngine on" >> $A2CF
|
||
echo " SSLProtocol all -SSLv2" >> $A2CF
|
||
echo " SSLCipherSuite ALLADHEXPORTSSLv2:RC4+RSA:+HIGH:+MEDIUM" >> $A2CF
|
||
|
||
if [ -f "$SSL_CERTIFICATE_FILE" ]; then
|
||
echo " SSLCertificateFile $SSL_CERTIFICATE_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CERTIFICATE_KEY_FILE" ]; then
|
||
echo " SSLCertificateKeyFile $SSL_CERTIFICATE_KEY_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CERTIFICATE_CHAIN_FILE" ]; then
|
||
echo " SSLCertificateChainFile $SSL_CERTIFICATE_CHAIN_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CA_CERTIFICATE_FILE" ]; then
|
||
echo " SSLCACertificateFile $SSL_CA_CERTIFICATE_FILE" >> $A2CF
|
||
fi
|
||
|
||
echo " SetEnvIf User-Agent \".*MSIE.*\" nokeepalive ssl-unclean-shutdown" >> $A2CF
|
||
fi
|
||
|
||
echo "</VirtualHost>" >> $A2CF
|
||
|
||
# redirection from http to https
|
||
if [ "$PROTOCOL" = "https" ] && [ "$HTTPS_ADD_REDIR" = true ]; then
|
||
echo "<VirtualHost *:80>" >> $A2CF
|
||
echo " ServerName ${SERVERNAME}" >> $A2CF
|
||
echo " ServerAlias www.${SERVERNAME}" >> $A2CF
|
||
echo " KeepAlive Off" >> $A2CF
|
||
echo " RewriteEngine On" >> $A2CF
|
||
echo " RewriteRule ^/(.*) https://${SERVERNAME}/\$1 [L,R=301]" >> $A2CF
|
||
echo "</VirtualHost>" >> $A2CF
|
||
fi
|
||
fi
|
||
|
||
# pre-configure protocol
|
||
sed -e "s/^ *\$config\['protocol'\] *=.*/\$config['protocol'] = '$PROTOCOL';/" < $CONFIG_SAMPLE_PHP > $CONFIG_SAMPLE_PHP.tmp
|
||
mv -f $CONFIG_SAMPLE_PHP.tmp $CONFIG_SAMPLE_PHP
|
||
|
||
# restart
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d apache2 restart 3>/dev/null || true
|
||
else
|
||
/etc/init.d/apache2 restart 3>/dev/null || true
|
||
fi
|
||
|
||
# 2) CRON
|
||
|
||
echo "Preparing CRON"
|
||
|
||
echo "# /etc/cron.d/freenetis: Regular CRON file for freenetis package (triggered each minute)" > /etc/cron.d/freenetis
|
||
echo "" >> /etc/cron.d/freenetis
|
||
echo "SHELL=/bin/sh" >> /etc/cron.d/freenetis
|
||
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/cron.d/freenetis
|
||
echo "* * * * * root wget -O /dev/null ${PROTOCOL}://${SERVERNAME}/index.php/cs/scheduler/run --no-check-certificate -q" >> /etc/cron.d/freenetis
|
||
|
||
chmod g-w /etc/cron.d/freenetis
|
||
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d cron restart 3>/dev/null || true
|
||
else
|
||
/etc/init.d/cron restart 3>/dev/null || true
|
||
fi
|
||
|
||
# 3) locales
|
||
|
||
echo "Preparing locales"
|
||
|
||
# list of required locales for FreenetIS -> add some for different language mutation
|
||
locales=(en_US.UTF-8 cs_CZ.UTF-8)
|
||
locales_lowered=(en_US.utf8 cs_CZ.utf8)
|
||
|
||
# is reconfigure of locales required?
|
||
reconfigure=0
|
||
debian=1
|
||
|
||
for index in ${!locales[*]}
|
||
do
|
||
|
||
loc=${locales[index]}
|
||
loc_lowered=${locales_lowered[index]}
|
||
|
||
set +e
|
||
locale -a | grep "^$loc_lowered$" > /dev/null
|
||
ret=$?
|
||
set -e
|
||
|
||
# locale not present
|
||
if [ $ret -ne 0 ]; then
|
||
reconfigure=1
|
||
encoding=`echo $loc | cut -f2 -d'.'`
|
||
loc_str="$loc $encoding"
|
||
|
||
if [ -f "/etc/locale.gen" ]; then # Debian
|
||
loc_str_esc="${loc_str//\//\\/}"
|
||
sed -e "s/^# $loc_str_esc/$loc_str_esc/" < /etc/locale.gen > /etc/locale.gen.tmp
|
||
mv -f /etc/locale.gen.tmp /etc/locale.gen
|
||
elif [ -d "/var/lib/locales/supported.d" ]; then # Ubuntu
|
||
debian=0
|
||
short_cut=`echo $loc | cut -f1 -d'_'`
|
||
touch /var/lib/locales/supported.d/${short_cut}
|
||
echo $loc_str >> /var/lib/locales/supported.d/${short_cut}
|
||
else
|
||
echo "Unknown locale generation, cannot generate locales"
|
||
exit 5
|
||
fi
|
||
fi
|
||
|
||
done
|
||
|
||
# reconfigure locales if any missing
|
||
if [ $reconfigure -eq 1 ]; then
|
||
if [ $debian -eq 1 ]; then # Debian
|
||
locale-gen
|
||
else # Ubuntu
|
||
dpkg-reconfigure locales
|
||
fi
|
||
fi
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/postrm.jessie | ||
---|---|---|
#!/bin/sh
|
||
# FreenetIS DEB: actions after uninstalling of package
|
||
|
||
set -e
|
||
|
||
CONFIGFILE=/etc/freenetis/freenetis.conf
|
||
|
||
# remove from Apache config
|
||
rm -rf /etc/apache2/conf-enabled/freenetis.conf
|
||
|
||
# remove all configuration if purge
|
||
if [ "$1" = purge ]; then
|
||
# remove defconf values
|
||
if [ -e /usr/share/debconf/confmodule ]; then
|
||
. /usr/share/debconf/confmodule
|
||
db_purge
|
||
fi
|
||
# remove config files
|
||
rm -rf $CONFIGFILE
|
||
# remove all files
|
||
rm -rf /usr/share/freenetis
|
||
# remove dir if empty
|
||
[ "$(ls -A /etc/freenetis)" ] || rm -rf /etc/freenetis
|
||
# restart apache
|
||
else
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d apache2 reload 3>/dev/null || true
|
||
else
|
||
/etc/init.d/apache2 reload 3>/dev/null || true
|
||
fi
|
||
fi
|
||
|
||
exit 0
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/postinst | ||
---|---|---|
#!/bin/bash
|
||
# FreenetIS DEB: actions after installing of package
|
||
|
||
set -e
|
||
. /usr/share/debconf/confmodule
|
||
|
||
SERVER=apache2
|
||
CONFIGFILE=/etc/freenetis/freenetis.conf
|
||
CONFIG_SAMPLE_PHP=/usr/share/freenetis/config-sample.php
|
||
|
||
# Generate config file, if it doesn’t exist.
|
||
# An alternative is to copy in a template
|
||
# file from elsewhere.
|
||
|
||
if [ ! -e $CONFIGFILE ]; then
|
||
mkdir /etc/freenetis/
|
||
echo "# Config file for FreenetIS" > $CONFIGFILE
|
||
echo "SERVERNAME=\"localhost/freenetis\"" >> $CONFIGFILE
|
||
echo "PROTOCOL=\"http\"" >> $CONFIGFILE
|
||
fi
|
||
|
||
# load configure file
|
||
. $CONFIGFILE || true
|
||
|
||
# Version 1.1 is located in /usr/share/freenetis but previous versions were
|
||
# located in /var/www/freeenetis, we try to use old config files if they are
|
||
# exists. The old configuration must not replace new configuration!
|
||
|
||
OLD_PATH=/var/www/freenetis
|
||
CURRENT_PATH=/usr/share/freenetis
|
||
|
||
# DB config
|
||
if [ -f "${OLD_PATH}/config.php" ] && [ ! -f "${CURRENT_PATH}/config.php" ]; then
|
||
echo "Copying old DB configuration from ${OLD_PATH}/config.php file"
|
||
cp "${OLD_PATH}/config.php" "${CURRENT_PATH}/config.php"
|
||
fi
|
||
|
||
# .htaccess
|
||
if [ -f "${OLD_PATH}/.htaccess" ] && [ ! -f "${CURRENT_PATH}/.htaccess" ]; then
|
||
echo "Copying old apache configuration from ${OLD_PATH}/.htaccess file"
|
||
cp "${OLD_PATH}/.htaccess" "${CURRENT_PATH}/.htaccess"
|
||
chmod 0666 "${CURRENT_PATH}/.htaccess" || true
|
||
fi
|
||
|
||
# Substitute in the values from the debconf db.
|
||
# There are obvious optimizations possible here.
|
||
# The cp before the sed ensures we do not mess up
|
||
# the config file’s ownership and permissions.
|
||
|
||
db_get freenetis/server_type
|
||
SERVER_TYPE="$RET"
|
||
|
||
db_get freenetis/servername
|
||
SERVERNAME="$RET"
|
||
|
||
db_get freenetis/protocol
|
||
PROTOCOL="$RET"
|
||
|
||
db_get freenetis/https_add_redir
|
||
HTTPS_ADD_REDIR="$RET"
|
||
|
||
cp -a -f $CONFIGFILE $CONFIGFILE.tmp
|
||
|
||
# h@ck for enable reloading vars from config file
|
||
db_set freenetis/hack_reload true
|
||
db_go || true
|
||
|
||
# If the admin deleted or commented some variables but then set
|
||
# them via debconf, (re-)add them to the conffile.
|
||
|
||
test -z "$SERVERNAME" || grep -Eq '^ *SERVERNAME=' $CONFIGFILE || echo "SERVERNAME=" >> $CONFIGFILE
|
||
test -z "$PROTOCOL" || grep -Eq '^ *PROTOCOL=' $CONFIGFILE || echo "PROTOCOL=" >> $CONFIGFILE
|
||
|
||
SERVERNAME_ESCAPED="${SERVERNAME//\//\\/}"
|
||
sed -e "s/^ *SERVERNAME=.*/SERVERNAME=\"$SERVERNAME_ESCAPED\"/" \
|
||
-e "s/^ *PROTOCOL=.*/PROTOCOL=\"$PROTOCOL\"/" < $CONFIGFILE > $CONFIGFILE.tmp
|
||
|
||
mv -f $CONFIGFILE.tmp $CONFIGFILE
|
||
|
||
# check server name
|
||
if [ -z "$SERVERNAME" ]; then
|
||
echo "Wrong server name, configuration failed!"
|
||
exit 3
|
||
fi
|
||
|
||
# check protocol
|
||
if [ -z "$PROTOCOL" ]; then
|
||
echo "Wrong protocol, configuration failed!"
|
||
exit 3
|
||
fi
|
||
|
||
# check SSL keys
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
|
||
if [ ! -f "$SSL_CERTIFICATE_FILE" ]; then
|
||
echo "SSL certificate file and key file not set properly."
|
||
echo "File $SSL_CERTIFICATE_FILE does not exists"
|
||
echo " => switching protocol from https to http"
|
||
PROTOCOL="http"
|
||
fi
|
||
|
||
if [ ! -f "$SSL_CERTIFICATE_KEY_FILE" ]; then
|
||
echo "SSL certificate file and key file not set properly."
|
||
echo "File $SSL_CERTIFICATE_KEY_FILE does not exists"
|
||
echo " => switching protocol from https to http"
|
||
PROTOCOL="http"
|
||
fi
|
||
|
||
fi
|
||
|
||
# Make post install things
|
||
|
||
# 0) Access rights to some directories
|
||
chmod ugo+w /usr/share/freenetis
|
||
chmod ugo+w /usr/share/freenetis/upload
|
||
mkdir -m 0777 /usr/share/freenetis/logs 2>/dev/null || true
|
||
|
||
# 1) Apache config
|
||
echo "Preparing Apache"
|
||
|
||
A2CF=/etc/$SERVER/conf.d/freenetis.conf
|
||
|
||
# activate redirection
|
||
a2enmod rewrite > /dev/null
|
||
|
||
# activate SSL if https selected
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
a2enmod ssl > /dev/null
|
||
fi
|
||
|
||
# PHP settings
|
||
php_settings="
|
||
# PHP settings
|
||
php_flag register_globals Off
|
||
php_flag magic_quotes_gpc Off
|
||
php_flag magic_quotes_runtime Off
|
||
php_flag file_uploads On
|
||
php_flag short_open_tag On
|
||
# large inputs (fixes #358, #410)
|
||
php_value max_input_vars 100000
|
||
php_admin_value suhosin.post.max_vars 100000
|
||
php_admin_value suhosin.request.max_vars 100000"
|
||
|
||
# make config for FN
|
||
if [ "$SERVER_TYPE" = localhost ]; then
|
||
|
||
echo "Alias /freenetis /usr/share/freenetis" > $A2CF
|
||
echo "<Directory /usr/share/freenetis>" >> $A2CF
|
||
echo " Options Indexes FollowSymLinks MultiViews" >> $A2CF
|
||
echo " AllowOverride All" >> $A2CF
|
||
echo " Order allow,deny" >> $A2CF
|
||
echo " allow from all" >> $A2CF
|
||
echo " ${php_settings}" >> $A2CF
|
||
echo "</Directory>" >> $A2CF
|
||
|
||
else
|
||
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
echo "NameVirtualHost *:443" > $A2CF
|
||
echo "<VirtualHost *:443>" >> $A2CF
|
||
else
|
||
echo "NameVirtualHost *:80" > $A2CF
|
||
echo "<VirtualHost *:80>" >> $A2CF
|
||
fi
|
||
|
||
echo " ServerName ${SERVERNAME}" >> $A2CF
|
||
echo " ServerAlias www.${SERVERNAME}" >> $A2CF
|
||
echo " DocumentRoot /usr/share/freenetis" >> $A2CF
|
||
echo " <Directory /usr/share/freenetis>" >> $A2CF
|
||
echo " Options Indexes FollowSymLinks MultiViews" >> $A2CF
|
||
echo " AllowOverride All" >> $A2CF
|
||
echo " Order allow,deny" >> $A2CF
|
||
echo " allow from all" >> $A2CF
|
||
echo " ${php_settings}" >> $A2CF
|
||
echo " </Directory>" >> $A2CF
|
||
echo " ErrorLog $ERROR_LOG_FILE" >> $A2CF
|
||
echo " CustomLog $CUSTOM_LOG_FILE common" >> $A2CF
|
||
|
||
if [ "$PROTOCOL" = "https" ]; then
|
||
echo " SSLEngine on" >> $A2CF
|
||
echo " SSLProtocol all -SSLv2" >> $A2CF
|
||
echo " SSLCipherSuite ALLADHEXPORTSSLv2:RC4+RSA:+HIGH:+MEDIUM" >> $A2CF
|
||
|
||
if [ -f "$SSL_CERTIFICATE_FILE" ]; then
|
||
echo " SSLCertificateFile $SSL_CERTIFICATE_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CERTIFICATE_KEY_FILE" ]; then
|
||
echo " SSLCertificateKeyFile $SSL_CERTIFICATE_KEY_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CERTIFICATE_CHAIN_FILE" ]; then
|
||
echo " SSLCertificateChainFile $SSL_CERTIFICATE_CHAIN_FILE" >> $A2CF
|
||
fi
|
||
|
||
if [ -f "$SSL_CA_CERTIFICATE_FILE" ]; then
|
||
echo " SSLCACertificateFile $SSL_CA_CERTIFICATE_FILE" >> $A2CF
|
||
fi
|
||
|
||
echo " SetEnvIf User-Agent \".*MSIE.*\" nokeepalive ssl-unclean-shutdown" >> $A2CF
|
||
fi
|
||
|
||
echo "</VirtualHost>" >> $A2CF
|
||
|
||
# redirection from http to https
|
||
if [ "$PROTOCOL" = "https" ] && [ "$HTTPS_ADD_REDIR" = true ]; then
|
||
echo "<VirtualHost *:80>" >> $A2CF
|
||
echo " ServerName ${SERVERNAME}" >> $A2CF
|
||
echo " ServerAlias www.${SERVERNAME}" >> $A2CF
|
||
echo " KeepAlive Off" >> $A2CF
|
||
echo " RewriteEngine On" >> $A2CF
|
||
echo " RewriteRule ^/(.*) https://${SERVERNAME}/\$1 [L,R=301]" >> $A2CF
|
||
echo "</VirtualHost>" >> $A2CF
|
||
fi
|
||
fi
|
||
|
||
# pre-configure protocol
|
||
sed -e "s/^ *\$config\['protocol'\] *=.*/\$config['protocol'] = '$PROTOCOL';/" < $CONFIG_SAMPLE_PHP > $CONFIG_SAMPLE_PHP.tmp
|
||
mv -f $CONFIG_SAMPLE_PHP.tmp $CONFIG_SAMPLE_PHP
|
||
|
||
# restart
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d apache2 restart 3>/dev/null || true
|
||
else
|
||
/etc/init.d/apache2 restart 3>/dev/null || true
|
||
fi
|
||
|
||
# 2) CRON
|
||
|
||
echo "Preparing CRON"
|
||
|
||
echo "# /etc/cron.d/freenetis: Regular CRON file for freenetis package (triggered each minute)" > /etc/cron.d/freenetis
|
||
echo "" >> /etc/cron.d/freenetis
|
||
echo "SHELL=/bin/sh" >> /etc/cron.d/freenetis
|
||
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/cron.d/freenetis
|
||
echo "* * * * * root wget -O /dev/null ${PROTOCOL}://${SERVERNAME}/index.php/cs/scheduler/run --no-check-certificate -q" >> /etc/cron.d/freenetis
|
||
|
||
chmod g-w /etc/cron.d/freenetis
|
||
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d cron restart 3>/dev/null || true
|
||
else
|
||
/etc/init.d/cron restart 3>/dev/null || true
|
||
fi
|
||
|
||
# 3) locales
|
||
|
||
echo "Preparing locales"
|
||
|
||
# list of required locales for FreenetIS -> add some for different language mutation
|
||
locales=(en_US.UTF-8 cs_CZ.UTF-8)
|
||
locales_lowered=(en_US.utf8 cs_CZ.utf8)
|
||
|
||
# is reconfigure of locales required?
|
||
reconfigure=0
|
||
debian=1
|
||
|
||
for index in ${!locales[*]}
|
||
do
|
||
|
||
loc=${locales[index]}
|
||
loc_lowered=${locales_lowered[index]}
|
||
|
||
set +e
|
||
locale -a | grep "^$loc_lowered$" > /dev/null
|
||
ret=$?
|
||
set -e
|
||
|
||
# locale not present
|
||
if [ $ret -ne 0 ]; then
|
||
reconfigure=1
|
||
encoding=`echo $loc | cut -f2 -d'.'`
|
||
loc_str="$loc $encoding"
|
||
|
||
if [ -f "/etc/locale.gen" ]; then # Debian
|
||
loc_str_esc="${loc_str//\//\\/}"
|
||
sed -e "s/^# $loc_str_esc/$loc_str_esc/" < /etc/locale.gen > /etc/locale.gen.tmp
|
||
mv -f /etc/locale.gen.tmp /etc/locale.gen
|
||
elif [ -d "/var/lib/locales/supported.d" ]; then # Ubuntu
|
||
debian=0
|
||
short_cut=`echo $loc | cut -f1 -d'_'`
|
||
touch /var/lib/locales/supported.d/${short_cut}
|
||
echo $loc_str >> /var/lib/locales/supported.d/${short_cut}
|
||
else
|
||
echo "Unknown locale generation, cannot generate locales"
|
||
exit 5
|
||
fi
|
||
fi
|
||
|
||
done
|
||
|
||
# reconfigure locales if any missing
|
||
if [ $reconfigure -eq 1 ]; then
|
||
if [ $debian -eq 1 ]; then # Debian
|
||
locale-gen
|
||
else # Ubuntu
|
||
dpkg-reconfigure locales
|
||
fi
|
||
fi
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/postrm | ||
---|---|---|
#!/bin/sh
|
||
# FreenetIS DEB: actions after uninstalling of package
|
||
|
||
set -e
|
||
|
||
CONFIGFILE=/etc/freenetis/freenetis.conf
|
||
|
||
# remove from Apache config
|
||
rm -rf /etc/apache2/conf.d/freenetis.conf
|
||
|
||
# remove all configuration if purge
|
||
if [ "$1" = purge ]; then
|
||
# remove defconf values
|
||
if [ -e /usr/share/debconf/confmodule ]; then
|
||
. /usr/share/debconf/confmodule
|
||
db_purge
|
||
fi
|
||
# remove config files
|
||
rm -rf $CONFIGFILE
|
||
# remove all files
|
||
rm -rf /usr/share/freenetis
|
||
# remove dir if empty
|
||
[ "$(ls -A /etc/freenetis)" ] || rm -rf /etc/freenetis
|
||
# restart apache
|
||
else
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d apache2 reload 3>/dev/null || true
|
||
else
|
||
/etc/init.d/apache2 reload 3>/dev/null || true
|
||
fi
|
||
fi
|
||
|
||
exit 0
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/preinst | ||
---|---|---|
#!/bin/bash
|
||
# FreenetIS DEB: actions before installing of package
|
||
|
||
set -e
|
||
. /usr/share/debconf/confmodule
|
||
|
||
SERVER=apache2
|
||
|
||
# shutdown server
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d apache2 stop 3>/dev/null || true
|
||
else
|
||
/etc/init.d/apache2 stop 3>/dev/null || true
|
||
fi
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/prerm | ||
---|---|---|
#!/bin/sh
|
||
# FreenetIS DEB: actions before uninstalling of package
|
||
|
||
set -e
|
||
|
||
# remove CRON entry
|
||
rm -rf /etc/cron.d/freenetis
|
||
|
||
# restart CRON
|
||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||
invoke-rc.d cron restart 3>/dev/null || true
|
||
else
|
||
/etc/init.d/cron restart 3>/dev/null || true
|
||
fi
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/templates | ||
---|---|---|
Template: freenetis/server_type
|
||
Type: select
|
||
Choices: localhost, other
|
||
Default: other
|
||
Description: Server:
|
||
Type of server (localhost or other with its own domain name)
|
||
Description-cs.UTF-8: Server:
|
||
Typ serveru (localhost nebo jiný s vlastním doménovým jménem)
|
||
|
||
Template: freenetis/servername
|
||
Type: string
|
||
Default:
|
||
Description: Server Name:
|
||
Server Name (with path) on which the FreenetIS will be hosted (without prefix www.).
|
||
Description-cs.UTF-8: Jméno serveru:
|
||
Jméno serveru (společně s cestou) na kterém bude FreenetIS nainstalován (bez předpony www.).
|
||
|
||
Template: freenetis/protocol
|
||
Type: select
|
||
Choices: http, https
|
||
Default: http
|
||
Description: Protocol:
|
||
Protocol for accessing of FreenetIS.
|
||
Description-cs.UTF-8: Protokol:
|
||
Protokol pro přístup k FreenetISu.
|
||
|
||
Template: freenetis/https_add_redir
|
||
Type: boolean
|
||
Default: false
|
||
Description: Automatically redirect from HTTP to HTTPS?
|
||
Description-cs.UTF-8: Automaticky přesměrovávat z HTTP na HTTPS?
|
||
|
||
Template: freenetis/hack_reload
|
||
Type: boolean
|
||
Default: true
|
||
Description: Hack for propper working of loading package?
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/config | ||
---|---|---|
#!/bin/sh
|
||
|
||
set -e
|
||
. /usr/share/debconf/confmodule
|
||
|
||
CONFIGFILE=/etc/freenetis/freenetis.conf
|
||
|
||
# Load config file, if it exists.
|
||
if [ -e $CONFIGFILE ]; then
|
||
db_get freenetis/hack_reload
|
||
if [ "$RET" = true ]; then
|
||
. $CONFIGFILE || true
|
||
db_set freenetis/servername "$SERVERNAME"
|
||
db_set freenetis/protocol "$PROTOCOL"
|
||
fi
|
||
fi
|
||
|
||
# h@ck for not reloading variables from config file (enabled again by postinst)
|
||
db_set freenetis/hack_reload false
|
||
|
||
# Ask questions.
|
||
db_input critical freenetis/server_type || true
|
||
db_go || true
|
||
|
||
db_get freenetis/server_type
|
||
if [ "$RET" = localhost ]; then
|
||
db_set freenetis/servername "localhost/freenetis"
|
||
db_set freenetis/protocol "http"
|
||
else
|
||
db_input critical freenetis/servername || true
|
||
db_input critical freenetis/protocol || true
|
||
fi
|
||
|
||
db_go || true
|
||
|
||
db_get freenetis/protocol
|
||
if [ "$RET" = https ]; then
|
||
db_input critical freenetis/https_add_redir || true
|
||
else
|
||
db_set freenetis/https_add_redir false
|
||
fi
|
||
|
||
db_go || true
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/conffiles | ||
---|---|---|
/etc/freenetis/freenetis.conf
|
freenetis/tags/1.1.12/application/vendors/deb/freenetis/freenetis.conf | ||
---|---|---|
################################################################################
|
||
# #
|
||
# FreenetIS configuration file (see http://www.freenetis.org) #
|
||
# #
|
||
# Allows to configure basic options of FreenetIS such as server name on #
|
||
# which it is hosted and protocol which is used for accessing. These options #
|
||
# are used for configuration of apache server. #
|
||
# #
|
||
# After changing of any configuration option an dpkg-reconfigure on freenetis #
|
||
# package must be run for making changes to configuration of FreenetIS #
|
||
# instance. #
|
||
# #
|
||
################################################################################
|
||
|
||
# Server Name (with path) on which the FreenetIS will be hosted
|
||
SERVERNAME="localhost/freenetis"
|
||
|
||
# Protocol for accessing of FreenetIS (http or https)
|
||
PROTOCOL="http"
|
||
|
||
# File for logging of apache errors (FreenetIS has its own logs stored in
|
||
# /var/www/freenetis/logs)
|
||
ERROR_LOG_FILE="/var/log/apache2/freenetis.error.log"
|
||
|
||
# File for logging of apache common messages (FreenetIS has its own logs stored
|
||
# in /var/www/freenetis/logs)
|
||
CUSTOM_LOG_FILE="/var/log/apache2/freenetis.log"
|
||
|
||
### SSL variables - only used if protocol is set to https ######################
|
||
# #
|
||
# SEE: http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#page-header #
|
||
# #
|
||
################################################################################
|
||
|
||
# SSL Certificate File
|
||
SSL_CERTIFICATE_FILE="/etc/freenetis/https/ssl.crt"
|
||
# SSL Certificate Key File
|
||
SSL_CERTIFICATE_KEY_FILE="/etc/freenetis/https/ssl.key"
|
||
|
||
# SSL Certificate Chain File [optional]
|
||
SSL_CERTIFICATE_CHAIN_FILE="/etc/freenetis/https/sub.class1.server.ca.pem"
|
||
# SSL Certificate Authority Certificate File [optional]
|
||
SSL_CA_CERTIFICATE_FILE="/etc/freenetis/https/ca.pem"
|
freenetis/tags/1.1.12/application/vendors/deb/debianization.sh | ||
---|---|---|
#!/bin/bash
|
||
################################################################################
|
||
# Script for debianization of FreenetIS
|
||
# (c) Ondrej Fibich, 2012
|
||
#
|
||
# Takes one or two arguments (version of package and package - if empty do it all)
|
||
# and it generates all FreenetIS packages to directory deb_packages.
|
||
#
|
||
################################################################################
|
||
|
||
if [ $# -lt 1 ]; then
|
||
echo "Wrong arg count.. Terminating"
|
||
exit 1
|
||
fi
|
||
|
||
CONFIG="./debianization.conf"
|
||
|
||
if [ -r $CONFIG ]; then
|
||
echo "Loading configuration file"
|
||
. $CONFIG
|
||
fi
|
||
|
||
NAMES=(freenetis freenetis-monitoring freenetis-redirection freenetis-dhcp \
|
||
freenetis-ssh-keys freenetis-qos)
|
||
DEBIANS=(lenny squeeze wheezy jessie)
|
||
VERSION=$1
|
||
|
||
if [ $# -eq 2 ] || [ $# -eq 3 ]; then
|
||
NAMES=($2)
|
||
fi
|
||
|
||
if [ $# -eq 3 ]; then
|
||
DEBIANS=($3)
|
||
fi
|
||
|
||
# functions ####################################################################
|
||
|
||
function red_echo() {
|
||
echo -e "\e[01;31m$1\e[0m"
|
||
}
|
||
|
||
function green_echo() {
|
||
echo -e "\e[01;32m$1\e[0m"
|
||
}
|
||
|
||
# create dirs ##################################################################
|
||
rm -rf deb_packages
|
||
mkdir deb_packages
|
||
|
||
# call all debianization utils #################################################
|
||
|
||
root_dir=`pwd`
|
||
|
||
for name in ${NAMES[*]}
|
||
do
|
||
name_mod=`echo $name | sed 's/-/_/g'`
|
||
for debian in ${DEBIANS[*]}
|
||
do
|
||
# get dir from config or default
|
||
conf_var_name="${name_mod}_debianization"
|
||
eval_str="echo \${${conf_var_name}}"
|
||
deb_dir_sh=`eval "$eval_str"`
|
||
if [[ -z "$deb_dir_sh" ]]; then
|
||
deb_dir_sh="./$name/"
|
||
fi
|
||
|
||
deb_sh="$deb_dir_sh/debianization.sh"
|
||
|
||
# run debianization
|
||
if [ -f "$deb_sh" ]; then
|
||
cd "$deb_dir_sh"
|
||
./debianization.sh "$VERSION" "$debian"
|
||
|
||
if [ $? -eq 0 ]; then
|
||
green_echo ">>>> [$name+$debian] debianized"
|
||
# move builded packages
|
||
if [ -d "deb_packages" ]; then
|
||
mkdir -p "$root_dir/deb_packages"
|
||
mv -f deb_packages/* "$root_dir/deb_packages"
|
||
fi
|
||
else
|
||
red_echo ">>>> [$name+$debian] an error occured during debianization"
|
||
fi
|
||
|
||
cd "$root_dir"
|
||
else
|
||
red_echo ">>>> [$name+$debian] not debianized (debianization utility is missing)"
|
||
fi
|
||
done
|
||
done
|
||
|
||
freenetis/tags/1.1.12/application/vendors/deb/debianization.sample.conf | ||
---|---|---|
# This is sample configuration for debianization script that allows to set up
|
||
# paths of dirs of sub debianization scripts in the file system.
|
||
# Rename this file as debianization.conf and rewrite variables.
|
||
freenetis_debianization=./freenetis/
|
||
freenetis_monitoring_debianization=./freenetis-monitoring/
|
||
freenetis_redirection_debianization=./freenetis-redirection/
|
||
freenetis_dhcp_debianization=./freenetis-dhcp/
|
||
freenetis_ssh_keys_debianization=./freenetis-ssh-keys/
|
||
freenetis_qos_debianization=./freenetis-qos/
|
freenetis/tags/1.1.12/application/vendors/deb/gpg_key.pub | ||
---|---|---|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||
Version: GnuPG v1.4.10 (GNU/Linux)
|
||
|
||
mQENBE/qqhcBCADLAvEA+ZsDRb3AKrgnaNO/18d7vWMTnX8TnFfK5lrM/tx072ZM
|
||
NydkJY68AUNyYhpCd7gSlnfFXUjOxBJq6uEgkXFV2mRt+zhk9MQBwPIvze1LBh5N
|
||
RNziTd3GfUEhV5YxxP3Q5BKS1+Xi/tnp7H/gcgwBnVSQ6qbHIp5gy3SGelBdnXP+
|
||
5wMX4fQ6nDo3KVd3a35pxRr9lLwhrVx3qSALZlow1iRHxdEQhl/9SpsXI9Gt8x0V
|
||
VX5GuWnAKWLn7ajs3udEq1qVWvdbKtHQHNzTjMIxq2nsjZId17dWFpee2xQF3ZC/
|
||
tXTOKoYu1SZ2mASi2KtakWn0SxXTIOEEkyxJABEBAAG0Ok9uZHJlaiBGaWJpY2gg
|
||
KHJlcG9zaXRvcnkgYWRtaW4pIDxvbmRyZWouZmliaWNoQGdtYWlsLmNvbT6JATgE
|
||
EwECACIFAk/qqhcCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEGacQLif
|
||
5NZkQ94H+gJ0PyggmeGvp3lFgHVTYTauXF0qfJ5VXsfUxRsVK5IAp1HsA582m4H8
|
||
N2F2+2iwm/ZGPauA8v7LN6MW3gmZazGA2n9I8Yv5C10MukSjPLfCFXF0mZLFX6NP
|
||
Nyff8O+6LL5Jn8x+uXu8TQOIr44EjF8Ccbmp9STZsLLaSvVhzleQtkbN2d8Id/eH
|
||
P4thwtnES4cE+BNTk2b8VuSIwYBkcXu8/vnrHQMMqumUClG613txoR41qPZKL+cZ
|
||
Qp9UMsJCEanOt+SSI9HeIvOkafdymOHNqk7UOs5cx186xVdE0PXK3Uje4MqTNZaA
|
||
CqSu3bGYGbHyUKT979ZsdF0L2smOD98=
|
||
=bzXa
|
||
-----END PGP PUBLIC KEY BLOCK-----
|
freenetis/tags/1.1.12/application/vendors/axo_doc/axo_doc.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
||
<!DOCTYPE axoDocumentation SYSTEM "axo_doc.dtd">
|
||
|
||
<axoDocumentation>
|
||
<object name="accounts" type="controller" comment-en="Credit accounts and recalculation of fees and balances" comment-cs="Kreditní účty a přepočítání poplatků a stavů účtů">
|
||
<method name="__construct" hide="true"></method>
|
||
<method name="index" hide="true"></method>
|
||
<method name="show_all" comment-en="Show all items" comment-cs="Zobrazuje všechny položky">
|
||
<axo section="Accounts_Controller" value="accounts" action="view" own="false" usage_type="access"></axo>
|
||
<axo section="Accounts_Controller" value="accounts" action="edit" own="false" usage_type="links"></axo>
|
||
<axo section="Accounts_Controller" value="accounts" action="new" own="false" usage_type="links"></axo>
|
||
<axo section="Accounts_Controller" value="transfers" action="view" own="false" usage_type="grid-action"></axo>
|
||
<axo section="Accounts_Controller" value="accounts" action="edit" own="false" usage_type="grid-action"></axo>
|
||
</method>
|
||
<method name="add_project">
|
||
<axo section="Accounts_Controller" value="accounts" action="new" own="false" usage_type="access"></axo>
|
||
<axo section="Accounts_Controller" value="accounts" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
</method>
|
||
<method name="edit" comment-en="Edit an item" comment-cs="Úprava položky">
|
||
<axo section="Accounts_Controller" value="accounts" action="edit" own="false" usage_type="access"></axo>
|
||
<axo section="Accounts_Controller" value="accounts" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
</method>
|
||
<method name="recalculate_account_balances">
|
||
<axo section="Accounts_Controller" value="accounts" action="edit" own="false" usage_type="access"></axo>
|
||
</method>
|
||
<method name="recalculate_fees">
|
||
<axo section="Accounts_Controller" value="accounts" action="edit" own="false" usage_type="access"></axo>
|
||
</method>
|
||
</object>
|
||
<object name="acl" type="controller" comment-en="Access rights" comment-cs="Přístupová práva">
|
||
<method name="index" hide="true"></method>
|
||
<method name="show_all" comment-en="Show all items" comment-cs="Zobrazuje všechny položky">
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="access"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="new" own="false" usage_type="links"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="edit" own="false" usage_type="grid-action"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="delete" own="false" usage_type="grid-action"></axo>
|
||
<axo section="Aro_groups_Controller" value="aro_group" action="view" own="false" usage_type="links"></axo>
|
||
</method>
|
||
<method name="show" comment-en="Show an item" comment-cs="Zobrazuje položku">
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="access"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="new" own="false" usage_type="grid-action"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="edit" own="false" usage_type="grid-action"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
</method>
|
||
<method name="add" comment-en="Add a new item" comment-cs="Přidání položky">
|
||
<axo section="Acl_Controller" value="acl" action="new" own="false" usage_type="access"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
</method>
|
||
<method name="edit" comment-en="Edit an item" comment-cs="Úprava položky">
|
||
<axo section="Acl_Controller" value="acl" action="edit" own="false" usage_type="access"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
<axo section="Acl_Controller" value="acl" action="view" own="false" usage_type="breadcrumbs"></axo>
|
||
</method>
|
||
<method name="delete" comment-en="Delete an item" comment-cs="Odstranění položky">
|
||
<axo section="Acl_Controller" value="acl" action="delete" own="false" usage_type="access"></axo>
|
||
</method>
|
||
</object>
|
||
<object name="address_points" type="controller" comment-en="Address points" comment-cs="Adresní body">
|
||
<method name="index" hide="true"></method>
|
Také k dispozici: Unified diff
Release 1.1.12