| 22 |
configure) |
configure) |
| 23 |
# Do Apache related processing if it is present. |
# Do Apache related processing if it is present. |
| 24 |
if [ -d "/etc/apache2" ]; then |
if [ -d "/etc/apache2" ]; then |
| 25 |
# Only do these if this is the initial install. |
# Only do these if this is the initial install. |
| 26 |
if [ "$2" = "" ]; then |
if [ "$2" = "" ]; then |
| 27 |
# Install ledgersmb-httpd.conf if a copy is not already installed. |
# Install ledgersmb-httpd.conf if a copy is not already installed. |
| 28 |
if [ -d "/etc/apache2/conf.d" ]; then |
if [ -d "/etc/apache2/conf.d" ]; then |
| 29 |
if [ ! -e "/etc/apache2/conf.d/ledgersmb-httpd.conf" ]; then |
if [ ! -e "/etc/apache2/conf.d/ledgersmb-httpd.conf" ]; then |
| 30 |
cp /usr/share/doc/ledgersmb/examples/ledgersmb-httpd.conf.template /etc/apache2/conf.d/ledgersmb-httpd.conf |
cp /usr/share/doc/ledgersmb/examples/ledgersmb-httpd.conf.template /etc/apache2/conf.d/ledgersmb-httpd.conf |
| 31 |
fi |
fi |
| 32 |
fi |
fi |
| 33 |
# Enable mod rewrite if it is not already enabled. |
# Enable Apache mod_rewrite |
| 34 |
if [ -d "/etc/apache2/mods-enabled" ]; then |
if [ -x "`which a2enmod 2>/dev/null`" ]; then |
| 35 |
if [ ! -h "/etc/apache2/mods-enabled/rewrite.load" ]; then |
a2enmod rewrite |
| 36 |
if [ -e "/usr/sbin/a2enmod" ]; then |
fi |
| 37 |
a2enmod rewrite |
# Restart apache |
| 38 |
|
if [ -x "/etc/init.d/apache2" ]; then |
| 39 |
|
invoke-rc.d apache2 restart || true |
| 40 |
fi |
fi |
|
fi |
|
| 41 |
fi |
fi |
| 42 |
# Restart apache |
fi |
| 43 |
if [ -e "/etc/init.d/apache2" ]; then |
# Only do these if this is the initial install. |
| 44 |
invoke-rc.d apache2 restart || true |
if [ "$2" = "" ]; then |
| 45 |
|
# Install a default copy of pos.conf.pl using the example template file. |
| 46 |
|
if [ ! -e "/usr/share/ledgersmb/pos.conf.pl" ]; then |
| 47 |
|
cp /usr/share/doc/ledgersmb/examples/pos.conf.pl.template /usr/share/ledgersmb/pos.conf.pl |
| 48 |
fi |
fi |
|
fi |
|
| 49 |
fi |
fi |
| 50 |
;; |
;; |
| 51 |
|
|