1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-05-27 21:26:18 +02:00

Use lightweigth bourne shell when possible

This script does not use bash specific features, therfore bash is not
necessary. If this script gets called too often, it may use up
unneccessary resources on sensor host.

For reference, here is comparison (binary size) on MacOS (almost ten
times difference):

```
% ls -lh /bin/sh /bin/bash
-r-xr-xr-x  1 root  wheel   1.3M Feb  9 10:39 /bin/bash
-rwxr-xr-x  1 root  wheel   131K Feb  9 10:39 /bin/sh
```

and on FreeBSD (~5x):

```
% ls -lh /bin/sh /usr/local/bin/bash
-r-xr-xr-x  1 root  wheel   166K Feb 23 20:52 /bin/sh
-rwxr-xr-x  1 root  wheel   963K Dec 15 02:15 /usr/local/bin/bash
```
This commit is contained in:
Babak Farrokhi 2023-03-06 11:49:28 +01:00
parent 96bffc5e98
commit 8cbc9ffdc6
No known key found for this signature in database
GPG Key ID: DCBF25301C0F5FD8

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
#
# Hello, lovely FastNetMon customer. I'm really happy to see you here