Ok, i've found a solution. Though i believe there should be a better way to do it as creating services just for that sounds strange.
Workaround using Upstart(i guess i'd have to write units if systemd will be used for this case as well).
create a file /etc/init/your_name.conf
if you want bash autocompletion to work put a link to /etc/init.d without ".conf" (/etc/init.d/your_name). Though i didn't try with it maybe it'll work too. In my case not needed anyway but if you'll write a script directly in *.conf and want to test it maybe useful.
Put quoted inside of /etc/init/your_name.conf
Quote:
# The deconfiguring-networking bit stops the network from going down until we are done here.
description "Script on shutdown"
start on runlevel [016] or deconfiguring-networking
#exec sh /path/to/script
# or
script
<script body here>
end script
|
found a solution here ->
http://unix.stackexchange.com/questi...eds-network-on