Skip to content

Instantly share code, notes, and snippets.

@lloesche
lloesche / plexscan.bash
Last active January 10, 2022 22:14
plexscan.bash
#!/bin/bash
set -o errexit -o nounset -o pipefail
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver/Library/Application Support"
export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
export PLEX_MEDIA_SERVER_TMPDIR=/tmp
export LD_LIBRARY_PATH="$PLEX_MEDIA_SERVER_HOME"
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
{% if grains['os_family'] == 'RedHat' and grains['osmajorrelease'][0] == '7' %}
include:
- .docker
/etc/sysconfig/selinux:
file.replace:
- pattern: SELINUX=enforcing
- repl: SELINUX=permissive
docker_version=$(docker version 2>/dev/null | awk '
BEGIN {
version = 0
client_version = 0
server_version = 0
}
{
if($1 == "Server:") {
server = 1
client = 0
$ cat ~/.ssh/config
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
Compression yes
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 4h
TCPKeepAlive no
diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c
index e588af9..bfce4e6 100644
--- a/src/haproxy-systemd-wrapper.c
+++ b/src/haproxy-systemd-wrapper.c
@@ -60,6 +60,8 @@ static void locate_haproxy(char *buffer, size_t buffer_size)
return;
}
+static int read_pids(char ***pid_strv);
+
When reloading haproxy too fast on EL7 (RedHat, CentOS) the system is
being filled with orphaned processes.
I encountered this problem on CentOS 7 with
haproxy-1.5.4-4.el7_1.x86_64 but expect it to exist on all systems
using haproxy-systemd-wrapper not just those based on Fedora.
Steps to reproduce:
1) haproxy is running normal.
#!/bin/bash
dnf install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install
#!/bin/bash
set -e -o nounset -o pipefail
# Credentials for user EBSbackup
# with inline policy that allows:
# ec2:CreateSnapshot
# ec2:CreateTags
# ec2:DeleteSnapshot
# ec2:DescribeSnapshots
# ec2:DescribeVolumes
@lloesche
lloesche / tox265.sh
Created March 13, 2016 22:07
encode input file to hevc
#!/bin/bash
set -euo pipefail
infile="$1"
preset=veryfast
audiobitrateperchannel=64
ffmpeg_docker='lloesche/nginx-fatpack'
originfile=$infile
[ ! -f "$infile" ] && \
echo "file $infile not found" && \
@lloesche
lloesche / update-network-folder-view.scpt
Created May 31, 2016 08:12
Update OSX Finder View (refreshes changed content on network/smb shares)
tell application "Finder" to tell front window to update every item