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