Try to make piratebox work properly

Posted by Mr_izmir 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Try to make piratebox work properly
October 12, 2014 02:19PM
Hi alls.

First of thanks for the project. I'm newbie. I even try to learn linux By reason of piratebox.

Anyway i try to make piratebox run on my linux system. But when I've started piratebox, i receive these errors on the below and also when I've clicked forum and files on the top menu it redirects me home page.

/opt/piratebox/init.d/piratebox: 57: /opt/piratebox/init.d/piratebox: [[: not found
Starting initialize PirateBox Part2..
/opt/piratebox/bin/distribute_files.sh: 41: [: all: unexpected operator
Distribute all into /opt/piratebox/share/Shared
cp: cannot stat `all': No such file or directory
/opt/piratebox/bin/install_piratebox.sh: 79: /opt/piratebox/bin/install_piratebox.sh: [[: not found
/opt/piratebox/bin/install_piratebox.sh: 80: /opt/piratebox/bin/install_piratebox.sh: [[: not found
* Starting script piratebox
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
Copy over design files
/opt/piratebox/bin/distribute_files.sh: 41: [: all: unexpected operator
Distribute all into /opt/piratebox/share/Shared
cp: cannot stat `all': No such file or directory
* Starting hostap... [ OK ]
* Setting up wlan Bringing up wifi interface wlan0
Setting up wlan0
* Starting dnsmasq... [fail]
* Starting droopy... [ OK ]
Generated HTML-Shoutbox File.
* Starting lighttpd... 2014-10-12 13:59:23: (network.c.358) can't bind to port: 80 Address already in use
[fail]

Any suggestion? Thanks in advance for the answers
Re: Try to make piratebox work properly
October 12, 2014 05:54PM
Hi,
as I need to know, please post the output of the following commands from the system where you want to run the piratebox:

ls -l /bin/sh
cat /opt/piratebox/version

Which Linux distribution did you install?

Then you need to disable lighttpd from default bootup. to disable it, I need to know thich distribution you are running.

regards
Matthias
Re: Try to make piratebox work properly
October 13, 2014 01:39AM
This is what i received as answers for the codes
lrwxrwxrwx 1 root root 4 Mar 29 2012 /bin/sh -> dash
piratebox-ws_1.0.1

I use elemantaryos. How will i disable lighttpd from default bootup?

When I entered this: sudo update-rc.d lighttpd stop

update-rc.d: warning: lighttpd start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: lighttpd stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
Use of uninitialized value $argv[1] in pattern match (m//) at /usr/sbin/update-rc.d line 310.
update-rc.d: error: expected NN after stop
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force

The disable|enable API is not stable and might change in the future.
=====================================================================

sudo update-rc.d lighttpd remove

update-rc.d: /etc/init.d/lighttpd exists during rc.d purge (use -f to force)
-====================================================================
sudo update-rc.d lighttpd -f remove

update-rc.d: warning: lighttpd start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: lighttpd stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force

The disable|enable API is not stable and might change in the future.

=============================================================

it is same for dnsmasq
Re: Try to make piratebox work properly
October 13, 2014 04:02AM
lrwxrwxrwx 1 root root 4 Mar 29 2012 /bin/sh -> dash
Ok, the first issue, is that your default shell is "dash"

you have to switch that to "bash". Run the following commands to do this:
sudo rm -v /bin/sh
sudo ln -s /bin/bash /bin/sh
But that solves only the script issues during the start of PirateBox.

Can you point me to some sort of documentation about that elementaryos ? I can't find anything?
It seems a problem of this unknown linux-distribution, that you are not able to disable bootup.
Is there a particular reason why you haven chose and not used some common distribution like Debian or Ubuntu?
edit: I found the website [elementaryos.org] which has not enough documentation to find a solution, nor it is possible to search properly. I think you should try to contact the developers of elementaryOS to find out what the correct command is and maybe let them fix the bug (how it looks alike).



Matthias



Edited 1 time(s). Last edit at 10/13/2014 04:08AM by Matthias.
Re: Try to make piratebox work properly
October 13, 2014 07:16AM
Thank you Matthias for your answers. There is no reason for the distro... I just like it.

sudo /opt/piratebox/init.d/piratebox start
* Starting script piratebox
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove ‘/opt/piratebox/tmp/’: Is a directory
Copy over design files
* Starting hostap... [ OK ]
* Setting up wlan Bringing up wifi interface wlan0
Setting up wlan0
* Starting dnsmasq... [fail]
* Starting droopy... [ OK ]
Generated HTML-Shoutbox File.
* Starting lighttpd... [ OK ]
========================================================

I've tried another distros also and i receive same thing..for example lubuntu:

dnsmasq fails.... and can't see any wireless network of piratebox on other devices when I've searched.

For removing codes in the stage of required packages i always receive same errors:

sudo update-rc.d dnsmasq remove
update-rc.d: /etc/init.d/dnsmasq exists during rc.d purge (use -f to force)
==============================================================

and I use this one;

sudo update-rc.d -f dnsmasq remove
Removing any system startup links for /etc/init.d/dnsmasq ...
==============================================================

I don't know linux . I think it must be the actual problem spinning smiley sticking its tongue out



Edited 2 time(s). Last edit at 10/13/2014 07:18AM by Mr_izmir.
Re: Try to make piratebox work properly
October 13, 2014 04:51PM
Yes, I'm pretty sure it is the same issue like you had with the lighttpd during the first try.

anyway. After you started the piratebox (like you log above), can you post me the result of
ps -ef
please?

Matthias


This is only my signature.
Re: Try to make piratebox work properly
November 23, 2014 10:21AM
sorry for the late answer i fixed my problem...i've installed another distro it's ok now...thank you for answers