debian -- start stuff at boot

A couple of ways to start jobs and daemons at boot in debian.

A simple way to run something after everything was started would be to put the command or script at /etc/rc.local

The political correct system V or debian way to manage a daemon is to make an init script for your daemon and use the System V init links to fire up your daemon or kill it in certain runlevels.

There is a skeleton for init scripts at /etc/init.d/skeleton that comes with debian systems and shows a bulletproof political correct way to do a system V ala debian init script.

However, a bare minimum init could be something like the following script.
# cat /etc/init.d/workerjob 
#g0 2014
#weak system V init script skeleton
#look at /etc/init.d/skeleton for a solid solution


case "$1" in

    echo "Starting ${DOJ} ..."
    # daemon 
    # /usr/bin/${DOJ} --config /etc/daemon/daemon.conf 

    # some daemon as user worker
    #su --login worker --command "/usr/bin/daemon --config /etc/daemon/daemon.conf"
    # some user worker job in screen
    #su --login worker --command "/usr/bin/screen -dmS ${DOJ} /usr/local/bin/${DOJ}"
    echo "attempting to stop ${DOJ} "
    # daemon
    # /usr/bin/daemon stop

    # some daemon as user worker
    #su --login worker --command "/usr/bin/${DOJ} stop"
    # some user job in screen worker
    pgrep -u worker screen |xargs kill -9

    ps aufx |grep ${DOJ} 

    echo "Usage: /etc/init.d/${INITNAME} {start|stop}"
    exit 1

exit 0

An easy way to add init scripts to the system V /etc/rc*.d/* init script links is update-rc.d

eg: to start workerjob in runlevels 2,3,4,5 and stop it in runlevels 1,6
# update-rc.d workerjob defaults
update-rc.d: using dependency based boot sequencing

To remove the workerjob from the init links
# update-rc.d workerjob remove -f
update-rc.d: using dependency based boot sequencing

Run after boot in debian

AWMN insider

v 0.4 1393681766

The Athens Wireless Metropolitan Network AWMN or ΑΜΔΑ in Greek is a wireless network community that received a lot of publicity lately. Most of the articles about AWMN seem funny to technical people and members of the AWMN Community have a tough time to find a tiny bit of truth in them. In this article I will try to set the record straight.


Most Backbone Nodes use the 5GHz band and most client nodes use the 2.4GHz band. There is a good chance that there are more Backbone nodes than client nodes in the AWMN.

802.11n/a/g along with some proprietary Mikrotik ( nv2 , nstreme ) and Ubiquity ( Airmax ) WLAN protocols are being used. RouterOS, OpenWRT and AirOS are the major players in the router Operating Systems. A plethora of antenna equipment and router hardware is being used and it is common for backbone operators to put together their antennas and feeders or their own roof-PC-router.


The AWMN is a BGP internet and there have been in the past islands under a common AS where another routing protocol eg OLSR was used. Currently there is only one small two-node OLSR island. Older members of the community are telling me that they used to use OSPF to internet back in the day. OSPF is used only as an in-node iBGP protocol in some nodes with many routers-bgp-speakers nowadays.

AWMN was planned to be part of a Wireless internet that spans Greece and uses the private IPv4 space 10/8. and is the IPv4 space that was allocated to AWMN according to the second Hellas Wireless addressing plan.

Number and Name Resources

In the AWMN a number and names authority aka hostmaster-team assigns numbers and delegates names to the members of the community. The resources are recorded and managed with a web application called Wireless Node Database WiND.

The hostmaster-TEAM delegates forward DNS zones in the .awmn. Top Level Domain along with reverse zones for the allocated IPv4.

Unfortunately, at this moment, the hostmaster-team is effectively only one person that is not respected by the community. It is very common for someone to pick an Autonomous System and one or more /24 IPv4 segments that are not in use and simply use them. Many members of the AWMN community want to create another WiND managed by a new Hostmaster TEAM.


There are approximately 26.000 Nodes in the AWMN WiND. Over 70% of them are noble intentions that were never materialized or simply trash.

There are approximately 600 backbone nodes in the AWMN. Every node is assigned its own Autonomous System number ( WiND node ID ) and at least one /24 IPv4 network. The backbone operators in the AWMN are 400 or less since many backbone operators own and operate more than one node. It is tough to estimate the number of clients and end-users of the AWMN internet. Approximately three thousand end users is a good guess according to many members of the Community.

Currently, I am conducting a census. Questionnaires have been send out to all the active node operators. So far it looks like there are approximately 568 real BackBone Nodes in the AWMN and approximately 385 Backbone operators. It is still tough to estimate the number of end users since it varies a lot from questionnaire to questionnaire and I do not have a safe sample of answers yet.

The AWMN internet spans Attica and it is connected to Peloponnese, Roumeli , Kefalonia and Euboea with wireless links. The AWMN internet is also connected to other communities in Greece and Europe with Internet VPNs.

Around 800 prefixes are announced by the AWMN nodes and the nodes in the borders with other communities that are connected through wireless links or Internet VPNs.

Services and Applications

Many Backbone operators are hackers who put together their own services and offer them to the Community.

A few uses of the AWMN internet are:

  • File sharing through FTP, dc hubs , Network shares , and Torrent Trackers
  • VoIP
  • Internet VPN , Internet Proxies
  • Game Servers
  • internet radio and video streaming
  • weather stations , internet cameras , security cameras
  • Alternative Connectivity for Radio operators, TV station operators , Radio Amateurs and Solar Park operators to their equipment

The services and applications are too many to list. What distinguishes the AWMN wireless community from other wireless communities is the large amount of native content.

Legal Representation

There is a "not-for-profit" organization that claims to be the Legal Representative of the AWMN Community. I ( ipduh ) and 24 other persons are currently members of this organization. Unfortunately, this organization does not represent the AWMN community and it is not accepted by the AWMN community. Less than 4% of the AWMN Community participated in the not-for-profit organization called AWMN in 2013. The community participation in the not-for-profit organization has dropped drastically the last two years. The president of the `not-for-profit` organization called AWMN during the last two years was Josef Bonicioli.

Approximately 9/25 members of the "not-for-profit" organization called AWMN do not operate nodes and have nothing to do with the AWMN Community. The AWMN organization Board is controlled by three persons who deny access to the financial records of the "not-for-profit" organization and they are suspected by many members of the AWMN community for embezzlement. Most backbone operators do not accept Bonicioli and there are many backbone operators who refuse to even be in the same room with Bonicioli.

I was present in the last elections for the "not-for-profit" organization called AWMN and I think of them as a bad joke.

The irregularities and the unlawful actions made by the tiny group that controls the organization during the elections are far to many to list. I will mention and explain just one of the many examples that shows the Board's audacity and corruption.

George from Sarantaporo was elected as vice president in the Board but he was replaced in the election minutes by a person known in the AWMN forum as Afanas. Afanas was sitting right next to me. Me and many other witnesses are 100% sure that he was not even a candidate. Members of the AWMN organization think that the reason behind this sudden change in the minutes is that George from Sarantaporo applied or he is about to apply for a CONFINE open call and he cannot be in both the Sarantaporo and the AWMN boards.

According to many members of the community the motivation behind the Board corruption, their slouch attempts to control everything AWMN related, and their claim that they represent all the AWMN community are the loosely managed CONFINE funds (420K-500K €).


Many members of the Community want to create a new WiND and put together another Hostmaster TEAM. Many members of the Community want to return the control of the not-for-profit called AWMN back to the Community. Other members of the Community want to create another "not-for-profit" organization. All the above, believe that the ones who control the not-for-profit organization hold back the AWMN Community.

I believe that if we restore Transparency and Democracy in our internet we can do great things.

Pictures from AWMN Backbone Nodes

Start headless VM guest VirtualBox Windows 7

Start a VirtualBox VM guest 'headless' in Windows 7 after a user logs in

Create a batch script --Put the following in a text file and save it saw startvm.bat
cd "C:\Program Files\Oracle\VirtualBox"
start /B VBoxHeadless --startvm vm007
vm007 is the name of guest we want to start 'headless'

Put the startvm.bat file in the windows 7 system startup directory
%systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

A command prompt should popup every time you login.

Start a VirtualBox VM guest at logon in Windows7

AWMN search --custom google

An AWMN search engine --a custom google --
that I put together to help me find AWMN related stuff in the Internetz.

You can add it to your browser here and here
or add the AWMN mozilla plugin if you are using firefox.

wget mirror a website directory to a local directory

Notes on using wget to mirror a directory of a website to a local directory

I think that the following options are sufficient
$ wget -nH --mirror --no-parent --cut-dirs=2 --page-requisites --directory-prefix=2 --convert-links

eg: To mirror everything from in the 'directory' and down to a local directory 'linux'
$ mkdir linux
$ wget -nH --mirror --no-parent --cut-dirs=3 --page-requisites --directory-prefix=linux --convert-links
$ ls linux
index.html  robots.txt
You should get two files in the local linux directory.
Look at index.html with a web browser ( with mozilla file:///path/to/linux/index.html ).

Options explanation from the manual

`-nH' `--no-host-directories' Disable generation of host-prefixed directories.  By default, invoking Wget with `-r' will create a structure of directories beginning with `'.  This option disables such

`-m' `--mirror' Turn on options suitable for mirroring.  This option turns on recursion and time-stamping, sets infinite
       recursion depth and keeps FTP directory listings.  It is currently equivalent to `-r -N -l inf --no-remove-listing'.

`--no-parent' Do not ever ascend to the parent directory when retrieving recursively.  This is a useful option, since it
       guarantees that only the files _below_ a certain hierarchy will be downloaded.  see "Directory-Based Limits", for more d

`--cut-dirs=NUMBER' Ignore NUMBER directory components.  This is useful for getting a fine-grained control over the directory
       where recursive retrieval will be saved.

`-p' `--page-requisites' This option causes Wget to download all the files that are necessary to properly display a given HTML
       page.  This includes such things as inlined images, sounds, and referenced stylesheets.

`-P PREFIX' `--directory-prefix=PREFIX' Set directory prefix to PREFIX.  The "directory prefix" is the directory where all
       other files and subdirectories will be saved to, i.e. the top of the retrieval tree.  The default is `.' (the current

`-k' `--convert-links' After the download is complete, convert the links in the document to make them suitable for local
       viewing.  This affects not only the visible hyperlinks, but any part of the document that links to external content, such as
       embedded images, links to style sheets, hyperlinks to non-HTML content, etc.

wget mirror a website section to a directory

post-up - Run command after bringing the interface up.

A quick note on post-up.

post-up is a command that may be used to run programs after an interface is up and it may be put in the interfaces file ( /etc/network/interfaces )

post is useful in bringing up firewalls, setup tunnels and custom routing and it is usually put at the bottom of the interface stanza.

auto eth3
iface eth3 inet static

post-up /etc/network/if-up.d/
post-up /etc/network/if-up.d/
post-up /etc/network/if-up.d/
post-up /etc/network/if-up.d/ 

where post-up brings up a bif firewall , sets funny custom routing for AWMN with my exception :) sets an IPv6 tunnel and an IPv6 firewall

post-up --run a command once an if is up

ntop debian set administrator password

set ntop administrator password on debian using the debian ntop packet ( ntop v.4.99.3 (64 bit) )

# dpkg-reconfigure ntop

ntop man page
By default at startup and at periodic intervals, the ntop program will retrieve a  file  containing  current  ntop  program  version  information.
Retrieving this file allows this ntop instance to confirm that it is running the most current version.
The retrieval is done using standard http:// requests, which will create log records on the hosting system.  These log records do contain information which identifies a specific ntop site.  Accordingly, you are being notified that this individually identifiable information is  being  transmitted and recorded.
to disable the the "tracking" add
to the startup options at /etc/init.d/ntop

ntop debian set administrator password and disable version checks