wok-next view shell-detector/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 7506b35e1c6f |
children | e7e7475e84c9 |
line source
1 # SliTaz package receipt.
3 PACKAGE="shell-detector"
4 VERSION="20140308"
5 CATEGORY="network"
6 SHORT_DESC="Web shell detection tool"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 WEB_SITE="https://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 #WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master"
13 WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git"
15 BUILD_DEPENDS="git"
17 compile_rules() {
18 mkdir -p $install/usr/share/$PACKAGE
19 cp -a * $install/usr/share/$PACKAGE
20 ln -s shelldetect.php $install/usr/share/$PACKAGE/index.php
21 chown -R www.www $install/usr/share/$PACKAGE
22 }
24 genpkg_rules() {
25 cp -a $install/usr $fs
26 DEPENDS="php"
27 }
29 post_install() {
30 # Configure lighttpd server
31 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
32 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
33 sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i "$1/etc/lighttpd/lighttpd.conf"
34 if [ -z "$1" ]; then
35 # Start Web server.
36 /etc/init.d/lighttpd stop
37 /etc/init.d/lighttpd start
38 fi
39 fi
40 fi
41 # Configure apache server
42 if [ -f "$1/etc/apache/httpd.conf" ]; then
43 if [ ! -f "$1/etc/apache/conf.d/$PACKAGE" ]; then
44 cat > "$1/etc/apache/conf.d/$PACKAGE" <<EOT
45 <IfModule mod_alias.c>
46 Alias /$PACKAGE /usr/share/$PACKAGE
47 </IfModule>
48 <DirectoryMatch /usr/share/$PACKAGE/>
49 DirectoryIndex index.php
50 Options +FollowSymLinks
51 AllowOverride None
52 Order allow,deny
53 Allow from all
54 </DirectoryMatch>
55 EOT
56 if [ -z "$1" ]; then
57 # Start Web server.
58 /etc/init.d/apache stop
59 /etc/init.d/apache start
60 fi
61 fi
62 fi
63 }