In order to create a debian package from your shell script do as follow:
Let's consider our package name is
You can copy the files into your package with the full paths on the destination filesystem. E.g. if you want to put a file in
In your
Now build the package using
This creates a dangling.deb file, which you can now install on any Debian installation with following command:
#debian #deb #create #package #dpkg #build
Let's consider our package name is
dangling
. We need to create 2 folders, first is called dangling and the second is DEBIAN
which is inside of the dangling folder:mkdir helloworld && mkdir helloworld/DEBIAN
You can copy the files into your package with the full paths on the destination filesystem. E.g. if you want to put a file in
/usr/local/bin/
you put it in dangling/usr/local/bin/
:mkdir -p dangling/usr/local/bin
cp /usr/local/bin/dangling.sh dangling/usr/local/bin/
In your
DEBIAN
directory (created at the begining of the post), create a control
file with the below content:<span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; white-space: pre;">Package: dangling
</span><span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; white-space: pre;">Version: 0.1
</span><span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; white-space: pre;">Maintainer: Alireza Hoseini
</span><span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; white-space: pre;">Architecture: all
</span><span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; white-space: pre;">Description: would wipe all docker dangling volumes out
NOTE:
These are the mandatory fields in the control file.Now build the package using
dpkg-deb
:dpkg-deb --build dangling
This creates a dangling.deb file, which you can now install on any Debian installation with following command:
dpkg -i dangling.deb
#debian #deb #create #package #dpkg #build
See live disk IO status by using
The output has many columns. The part I'm interested in for now is
second. To see size per second in read and write see columns
#linux #debian #iostat #read_per_second #write_per_second #sysstat
iostat
:iostat -dx 1
The output has many columns. The part I'm interested in for now is
r/s
which refers to read per second and w/s
which is write persecond. To see size per second in read and write see columns
rkB/s
, wkB/s
in their corresponding order.NOTE:
if you don't have iostat on your linux os install it on debian by issuing apt-get install sysstat
command.#linux #debian #iostat #read_per_second #write_per_second #sysstat
If you want to disable mouse in
It just kills me when I want to work with vim with mouse enabled!
#linux #debian #vim #mouse_enabled
vim 8
in new Debian, put the below line in your ~/.vimrc
:set mouse=c
It just kills me when I want to work with vim with mouse enabled!
#linux #debian #vim #mouse_enabled
https://www.linode.com/docs/networking/nfs/how-to-mount-nfs-shares-on-debian-9/
#nfs #debian #mount #export #fstab
#nfs #debian #mount #export #fstab
Linode Guides & Tutorials
How to Mount NFS Shares on Debian 9
With NFS, computer users can access files across multiple servers on a network. This guide sets up two Linodes for file sharing as an NFS server and client.
Tech C**P
There are times you run a command in cronjob in a specific interval. Let's say you run that command every hour. If your command copies a huge file, or you are doing a heavy task that may take longer than 1 hour sometimes, then you need run-one command in…
run-one
script for debian:https://github.com/dustinkirkland/run-one/blob/master/run-one
#run_one #debian
GitHub
run-one/run-one at master · dustinkirkland/run-one
git mirror of upstream bzr at http://launchpad.net/run-one - dustinkirkland/run-one
https://askubuntu.com/questions/726601/nethogs-%E2%86%92-creating-socket-failed-while-establishing-local-ip-are-you-root
#nethogs #debian #linux #bug
#nethogs #debian #linux #bug
Ask Ubuntu
Nethogs → creating socket failed while establishing local IP - are you root?
Following update of my Kubuntu, I'm not able to monitor my network consumption using nethogs:
sudo nethogs enp1s0
creating socket failed while establishing local IP - are you root?
Kernel
$ unam...
sudo nethogs enp1s0
creating socket failed while establishing local IP - are you root?
Kernel
$ unam...
Virt-builder
is a tool for quickly building new virtual machines. You can build a variety of VMs for local or cloud use, usually within a few minutes or less. Virt-builder
also has many ways to customize these VMs. Everything is run from the command line and nothing requires root privileges, so automation and scripting is simple.To see available virtual machines:
virt-builder --list
Sample command to create a
debian-9
image:sudo virt-builder debian-9 --size=50G --hostname prod.example.com --network --install network-manager --root-password password:YOUR_PASS
The above command creates a debian 9 image with disk size of 50GB and sets the hostname to
prod.example.com
. --network
enables the networking on guest and --install
installs packages on the target OS. The last parameter sets the root password to
YOUR_PASS
.To read more about the axtra parameters:
- http://libguestfs.org/virt-builder.1.html
#linux #sysadmin #virt_builder #debian #image
In
gist in github for it:
- https://gist.github.com/SanderTheDragon/1331397932abaa1d6fbbf63baed5f043
Download shell and run it! (Be careful and read any shell script before running it, I've read it myself)
Now you can add it to favorites and have instant access to it.
Spread your love for m2sh :)))
#postman #debian #ubuntu #shell #gist #github
Debian
based OSes if you want to install Postman
you need to download the binary package and run it everytime you need. But there is a better way for it that you can access Postman
system wide. There isgist in github for it:
- https://gist.github.com/SanderTheDragon/1331397932abaa1d6fbbf63baed5f043
Download shell and run it! (Be careful and read any shell script before running it, I've read it myself)
Now you can add it to favorites and have instant access to it.
Spread your love for m2sh :)))
#postman #debian #ubuntu #shell #gist #github
Gist
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file. - postman-deb.sh