Hot answers tagged

4

Your command may not be working as you expected thanks to a common bash gotcha: docker exec <container> /bin/sh -c "go test $(go list ./... | grep -v '<excluded>')" The command you are trying to run will perform the expansion of the subshell $() on your host because it is inside double quotes. This can be solved by single quoting your command ...


3

Possibilities: The perl script isn't exiting with status 0 on success and set -e is in effect. The bash script is executing the perl script with exec


3

You can add your script in ~/.bash_profile where ~ represents the homedir of the user for which running the script is intended.


2

when a user connects to OpenVPN the following learn-address script is called The $1, $2, and $3 are the arguments passed to the script, that are documented in the man page. --learn-address cmd ... Three arguments will be appended to any arguments in cmd as follows: [1] operation -- "add", "update", or "delete" based on whether or not the address ...


2

Try netstat -ant | egrep '(:80|:443) .*:.*ESTABLISHED' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c or netstat -nt | awk '$4 ~ /:(143|993)$/ && $6 ~ /ESTABLISHED/ {print $5}' | cut -d: -f1 | sort | uniq -c netstat -nt lists TCP connections without DNS lookups of the IP address egrep ':(80|443) .*:.*ESTABLISHED' selects ESTABLISHED ...


1

According to https://www.freedesktop.org/software/systemd/man/systemd.exec.html. Perhaps 'u' in user must be capitalize to accomplish what you need. [Unit] Description=RTC Client Services [Service] User=linuxuser WorkingDirectory=/usr/lib/systemd/scripts/ Type=forking ExecStart=/bin/bash rtc_client.sh start ExecStop=/bin/bash rtc_client.sh stop Restart=no ...


1

/sys/block/sdX/device/model contains the device it's booting off. In my case: Samsung SSD 850. You could grep it for USB for example. Won't be too accurate of course, but should work in most cases :)


1

You wouldn't use grep, you could use awk, but I prefer a nice regex with sed. # <logs sed -nE 's,^([-0-9]{10})[^@]* ([^@]*@[^[:space:]]*)[^=]*F=<([^@]*@[^[:space:]]*)>.*SIZE=[^[:space:]]* (... ..-...) .*([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+).*,\1 \2 \3 \5 \4,p' Looks scary, but it captures the bits in parentheses as groups (\1 \...


1

Nevermind. I figured it out. You find the shell it spawned from, kill the shell, everything goes away


1

In this answer an approach is shown to let OpenVPN run with multiple instances for better performance. As mentioned in this forum post, OpenVPN could run into performance problems when the client count per instance exceeds 200 users, this is because of the monolithic way it was coded in. This will not change until version 3 as stated in the post.


1

From a performance perspective (OpenVPN offers more than just encryption), this is key After further research, yes you can disable encryption in OpenVPN with these configuration directives: auth none cipher none Set these in your server configuration and you will have no security at all provided by OpenVPN See for example: http://docs.openvpn....


1

cowsay $ cowsay cowsay makes banners ______________________ < cowsay makes banners > ---------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || $ cowsay -f tux cowsay is customisable ________________________ < cowsay is customisable > ---------------------...



Only top voted, non community-wiki answers of a minimum length are eligible