Comments (2)
I found in phpmyadmin package these nice script snippets for lighthttpd and apache2.4 which both have now an conf-available folder:
postinst:
lighttpd_install() {
if [ ! -f /etc/lighttpd/conf-available/50-phpmyadmin.conf ] ; then
if which lighty-enable-mod >/dev/null 2>&1 ; then
ln -s ../../phpmyadmin/lighttpd.conf /etc/lighttpd/conf-available/50-phpmyadmin.conf
# We also need auth to protect setup.php
lighty-enable-mod phpmyadmin auth fastcgi fastcgi-php
avahi_install
desktop_install
else
echo "Lighttpd not installed, skipping"
fi
fi
}
apache_install() {
mkdir -p /etc/apache2/conf-available
ln -sf ../../phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf phpmyadmin
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/phpmyadmin.conf ] && ln -s ../conf-available/phpmyadmin.conf /etc/apache2/conf.d/phpmyadmin.conf
fi
avahi_install
desktop_install
}
postrm
lighttpd_remove() {
if [ -f /etc/lighttpd/conf-available/50-phpmyadmin.conf ] ; then
rm -f /etc/lighttpd/conf-available/50-phpmyadmin.conf
if which lighty-enable-mod >/dev/null 2>&1 ; then
lighty-disable-mod phpmyadmin
# We also enabled auth in postinst, but I think it's safer to keep it there
else
echo "Lighttpd not installed, skipping"
fi
# See bug #448682
if [ -h /etc/lighttpd/conf-enabled/50-phpmyadmin.conf ] ; then
echo 'Manually deleting lighttpd/phpMyAdmin configuration link'
rm /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
fi
fi
}
apache_remove() {
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf phpmyadmin
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
rm -f /etc/apache2/conf.d/phpmyadmin.conf
fi
rm -f /etc/apache2/conf-available/phpmyadmin.conf
}
from matomo-package.
@Reiner030 Thanks for the code. #42 has been closed and embeds one configuration file for both Apache 2.2 and 2.4. This should work out of the box now.
from matomo-package.
Related Issues (20)
- debian.matomo.org has wrong URL for GitHub HOT 1
- Changes in website format prevents pulling changelog when generating Debian package HOT 8
- Matomo 3.8.1 update? HOT 9
- libmaxminddb recommendations HOT 22
- matomo.php and matomo.js are missing from debian package HOT 1
- Debian stretch (Matomo will stop supporting PHP 7.0 in the next major version.) HOT 17
- Smaller release file (remove not needed files from release) HOT 2
- Do not prepend autoloader HOT 1
- Package for 3.15.5 HOT 3
- On upgrade "The Matomo JavaScript tracker file "/matomo.js" & "/piwik.js" is not writable" HOT 2
- No debian package since 3.13.6 HOT 17
- Automate the packaging of Matomo beta/rc/stable releases via Github actions HOT 6
- Remove the WAG build from the script
- Releasing Matomo 4.0 for Debian HOT 13
- Don't include JS test files in the release
- Exclude phpcs.xml from release package
- Is the Matomo Debian package dead? HOT 72
- Working on debian package generation: .eslintrc ? HOT 1
- Working on debian package generation: autoload.php HOT 1
- Manifest / Integrity check has issues with symlinks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-package.