DownloadDaemon 1.1

Make a PKGBUILD? Submit it here for user review and possible placement into the repository.

Re: DownloadDaemon 1.1

Postby farsheedj » Mon Feb 28, 2011 5:49 am

Hi Pepedog
Never mind. You php configuration came handy.I copied and pasted your php.ini configuration files from your previous posts and now webinterface is back up. I still don't know what exactly broke with the update but it costed me whole sunday evening when I could have been watching Oscar's.
Thanks.
farsheedj
 
Posts: 48
Joined: Wed Feb 09, 2011 6:07 pm

Re: DownloadDaemon 1.1

Postby farsheedj » Mon Feb 28, 2011 6:54 pm

Hi Dan64
You mentioned that you r using lighttpd with downloaddaemon. I have lighttpd installed as it takes less memory.How do you configure it to work with dd webinterface.Can copy/paste your lightpd configuration files and necessary steps.
thanks
farsheedj
 
Posts: 48
Joined: Wed Feb 09, 2011 6:07 pm

Re: DownloadDaemon 1.1

Postby dan64 » Sat Mar 05, 2011 8:45 am

You can follow this wiki to install lighttpd (skip the section regarding Ruby on Rails related)

https://wiki.archlinux.org/index.php/Fastcgi_and_lighttpd

or this one (skip the section regarding SSL and eAcceleration)

https://wiki.archlinux.org/index.php/Lighttpd_For_Both_SSL_And_Non-SSL

then edit a new /etc/lighttpd/lighttpd.conf and insert the following lines:

Code: Select all
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above

############ Options you really have to take care of ####################

## modules to load
server.modules              = (
                                "mod_access",
                                "mod_fastcgi",
                                "mod_simple_vhost",
                                "mod_compress")

server.document-root        = "/srv/http"
server.errorlog             = "/var/log/lighttpd/error.log"
index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )

# mimetype mapping
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jar"          =>      "application/x-java-archive",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",
  # default mime type
  ""              =>      "application/octet-stream",
 )

accesslog.filename          = "/var/log/lighttpd/access.log"

url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

## bind to port (default: 80)
server.port                = 80

server.pid-file            = "/var/run/lighttpd/lighttpd.pid"


dir-listing.activate       = "enable"
dir-listing.encoding        = "utf-8"

server.username            = "http"
server.groupname           = "http"

compress.cache-dir         = "/var/cache/lighttpd/compress/"
compress.filetype          = ("text/plain", "text/html")

#### fastcgi module
fastcgi.server   = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )

server.follow-symlink="enable"


Then write a file called: "phpinfo.php" in "/srv/http", insert the following statements:

Code: Select all
    <?php
    define('TESTING', 1);
    phpinfo();
    ?>


Then modify the doc_root of the file /etc/php/php.ini:

Code: Select all
doc_root = /srv/http


then open your browser: http://<plugbox_internal_ip>/phpinfo.php

If display a page with a lot of informations you have php installed, if not your version of php doesn't work with lighttpd, install this version:

Code: Select all
pacman -Uf http://myplugbox.com/php/php-5.3.3-4-arm.pkg.tar.xz


I hope this can help.

P.S.
To simplify the management of your server you can install Webmin, see this wiki for the installation: https://wiki.archlinux.org/index.php/Webmin
dan64
 
Posts: 51
Joined: Mon Jan 31, 2011 8:52 pm

Re: DownloadDaemon 1.1

Postby pepedog » Sat Mar 05, 2011 12:25 pm

I ought to take down http://myplugbox.com/php/php-5.3.3-4-arm.pkg.tar.xz
It was a hack and contains all php modules, and main repo packages do work just fine.
pepedog
Developer
 
Posts: 1665
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: DownloadDaemon 1.1

Postby farsheedj » Sat Mar 05, 2011 8:38 pm

Thanks Dan64. Lighttpd and webmin are both up and working.
regards,
farsheedj
 
Posts: 48
Joined: Wed Feb 09, 2011 6:07 pm

Re: DownloadDaemon 1.1

Postby raulcomander » Sun Jul 03, 2011 2:25 am

Hi, i am trying to install downloaddaemon, i have created the new user with:
Code: Select all
adduser downloadd

But how can i tell download daemon to use this user?
raulcomander
 
Posts: 9
Joined: Sun May 01, 2011 3:38 pm

Re: DownloadDaemon 1.1

Postby dan64 » Tue Jul 05, 2011 6:40 pm

Raul,

the installation package will install the start script in /etc/int.d/downloadd, to run on Arch Linux ARM you have to move the file in /etc/rc.d that is the standard script directory.

Regards
dan64
 
Posts: 51
Joined: Mon Jan 31, 2011 8:52 pm

Re: DownloadDaemon 1.1

Postby raulcomander » Wed Aug 03, 2011 3:07 pm

Thanks Dan, a mont ago the instalation was unsuccessful, but now im giving it a chance again.

Installed from Pacman with:

Code: Select all
mkdir -p /tmp/dd
cd /tmp/dd
wget https://aur.archlinux.org/packages/downloaddaemon/downloaddaemon/PKGBUILD
makepkg --asroot
pacman -U downloaddaemon-1115-1-.arm.pkg.tar.xz

ok

Then move downloadd from /etc/int.d/downloadd to /etc/rc.d

Created user downloadd

Added downloadd to DAEMONs at /etc/rc.conf

and start/stop with

Code: Select all
/etc/rc.d/downloadd start
/etc/rc.d/downloadd stop

At this point, the two instrucions doesnt work, dont return neither FAIL nor BUSY nor DONE
When ask for status, "DownloadDaemon is not running."
Am i missing something? Sure i am.

Thanks
raulcomander
 
Posts: 9
Joined: Sun May 01, 2011 3:38 pm

Re: DownloadDaemon 1.1

Postby dan64 » Sat Aug 13, 2011 12:16 pm

Raul

as suggested you should set the permssion to the configuration directory:

Code: Select all
chown -R downloadd:downloadd /etc/downloaddaemon


then you could use the following script to run the daemon:

Code: Select all
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/DownloadDaemon
NAME=downloadd
DESC=DownloadDaemon
USER=downloadd

. /etc/rc.conf
. /etc/rc.d/functions

test -x $DAEMON || exit 0

#set -e

case "$1" in
  start)
    export HOME=/home/downloadd
    stat_busy "Starting $DESC:... "
       su -l -s /bin/sh $USER -c "$DAEMON -d"
#       while ! netstat -l -n -p -t | grep -q DownloadDaemon ; do sleep 1 ; done
       sleep 2
    add_daemon downloadd
    stat_done
    ;;
  stop)
    stat_busy "Stopping $DESC:... "
       killall -q DownloadDaemon
       sleep 1
    rm_daemon DownloadDaemon
    stat_done
    ;;
  restart|force-reload)
    "$0" stop
    "$0" start
    ;;
  *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
esac

exit 0



Regards
dan64
 
Posts: 51
Joined: Mon Jan 31, 2011 8:52 pm

Re: DownloadDaemon 1.1

Postby raulcomander » Sun Aug 14, 2011 6:37 pm

Thanks dan, the script is working.

As the next step have installed lighttpd with php 5.3.3 http://myplugbox.com/php/php-5.3.3-4-arm.pkg.tar.xz and php test is working, but when i try to acces to http://PlugIP:56789 it returns "Conection to server was reset while loading"
or displays "11:100 SUCCESS" but never the web-gui
raulcomander
 
Posts: 9
Joined: Sun May 01, 2011 3:38 pm

PreviousNext

Return to User-Submitted Packages

Who is online

Users browsing this forum: No registered users and 0 guests