From f2c372893573c3d869c0430b1789f593fabf98e2 Mon Sep 17 00:00:00 2001 From: Diederik de Groot Date: Mon, 15 Apr 2019 14:59:59 +0200 Subject: [PATCH] Smaller fixes --- etc/apache2/conf.d/tftpboot.conf | 29 +++++++++++++++++ .../sites-available/http-tftpboot.conf | 27 ---------------- tftpboot/index.php | 2 +- tftpboot/ringtones/mkringlist.sh | 4 +-- tftpboot/ringtones/ringlist.xml | 32 +++++++++---------- 5 files changed, 48 insertions(+), 46 deletions(-) create mode 100644 etc/apache2/conf.d/tftpboot.conf delete mode 100644 etc/apache2/sites-available/http-tftpboot.conf diff --git a/etc/apache2/conf.d/tftpboot.conf b/etc/apache2/conf.d/tftpboot.conf new file mode 100644 index 0000000..fdb37ef --- /dev/null +++ b/etc/apache2/conf.d/tftpboot.conf @@ -0,0 +1,29 @@ +Listen 6970 + + DocumentRoot "/tftpboot" + ErrorLog /var/log/httpd/tftp.error.log + CustomLog /var/log/httpd/tftp.access.log combined + + + Options FollowSymlinks + AllowOverride none + Require all granted + RewriteEngine on + RewriteBase "/" + RewriteCond "/tftpboot/%{REQUEST_FILENAME}" !-f + RewriteCond "/tftpboot/%{REQUEST_FILENAME}" !-d + RewriteRule "(.*)" "index.php?id=$1" [PT,QSA] + + + + Options FollowSymLinks + AllowOverride all + Require all granted + + + + Require all granted + + + Alias / "/tftpboot/" + diff --git a/etc/apache2/sites-available/http-tftpboot.conf b/etc/apache2/sites-available/http-tftpboot.conf deleted file mode 100644 index 1eb9d32..0000000 --- a/etc/apache2/sites-available/http-tftpboot.conf +++ /dev/null @@ -1,27 +0,0 @@ -# -# ---------------- Apache 2 ( httpd ) Configuration to support the starting load of the cisco phones via HTTP. -Listen 6970 -NameVirtualHost *:6970 - - DocumentRoot "/tftpboot" -# DocumentRoot "/data/development/sccp/sources/tftp/tftpboot" -# server_name default - ErrorLog /var/log/httpd/tftp.error.log - CustomLog /var/log/httpd/tftp.access.log combined -# Other directives here - - RewriteEngine on - RewriteBase "/" - RewriteCond "/tftpboot/%{REQUEST_FILENAME}" !-f - RewriteCond "/tftpboot/%{REQUEST_FILENAME}" !-d - RewriteRule "(.*)" "index.php?id=$1" [PT,QSA] - -# -# RewriteEngine on -# RewriteBase "/" -# RewriteCond "/data/development/sccp/sources/tftp/tftpboot/%{REQUEST_FILENAME}" !-f -# RewriteCond "/data/development/sccp/sources/tftp/tftpboot/%{REQUEST_FILENAME}" !-d -# RewriteRule "(.*)" "index.php?id=$1" [PT,QSA] -# - - diff --git a/tftpboot/index.php b/tftpboot/index.php index b794ea8..6b700e1 100644 --- a/tftpboot/index.php +++ b/tftpboot/index.php @@ -40,7 +40,7 @@ $request = $_REQUEST; $req_file = !empty($request['id']) ? $request['id'] : ''; # directory content extensions map -$fw_suffix = array('.bin', '.loads', '.sbn', '.sb2', '.sbin', '.zz', '.zup'); +$fw_suffix = array('.bin', '.loads', '.sbn', '.sb2', '.sbin', '.zz', '.zup', '.loads'); //$settings_suffix = array('cnf.xml'); diff --git a/tftpboot/ringtones/mkringlist.sh b/tftpboot/ringtones/mkringlist.sh index a54a400..598ce26 100755 --- a/tftpboot/ringtones/mkringlist.sh +++ b/tftpboot/ringtones/mkringlist.sh @@ -6,7 +6,7 @@ if [ ! -z "`ls *.pcm 2>/dev/null`" ]; then basename=`basename ${filename} .pcm` echo -e "\t" >>$outfile echo -e "\t\t${basename}" >>$outfile - echo -e "\t\t${filename}" >>$outfile + echo -e "\t\tringtones\${filename}" >>$outfile echo -e "\t" >>$outfile done fi @@ -15,7 +15,7 @@ if [ ! -z "`ls *.raw 2>/dev/null`" ]; then basename=`basename ${filename} .raw` echo -e "\t" >>$outfile echo -e "\t\t${basename}" >>$outfile - echo -e "\t\t${filename}" >>$outfile + echo -e "\t\tringtones\${filename}" >>$outfile echo -e "\t" >>$outfile done fi diff --git a/tftpboot/ringtones/ringlist.xml b/tftpboot/ringtones/ringlist.xml index bff02a9..2c7e4b5 100644 --- a/tftpboot/ringtones/ringlist.xml +++ b/tftpboot/ringtones/ringlist.xml @@ -1,62 +1,62 @@ - + drums1 - drums1.pcm + ringtones\drums1.pcm drums2 - drums2.pcm + ringtones\drums2.pcm loudc1 - loudc1.pcm + ringtones\loudc1.pcm loudc2 - loudc2.pcm + ringtones\loudc2.pcm loudlaser - loudlaser.pcm + ringtones\loudlaser.pcm merlin2 - merlin2.pcm + ringtones\merlin2.pcm merlin3 - merlin3.pcm + ringtones\merlin3.pcm merlin4 - merlin4.pcm + ringtones\merlin4.pcm merlin5 - merlin5.pcm + ringtones\merlin5.pcm merlin6 - merlin6.pcm + ringtones\merlin6.pcm merlin7 - merlin7.pcm + ringtones\merlin7.pcm ringer1 - ringer1.pcm + ringtones\ringer1.pcm ringer2 - ringer2.pcm + ringtones\ringer2.pcm ringer3 - ringer3.pcm + ringtones\ringer3.pcm ringer4 - ringer4.pcm + ringtones\ringer4.pcm