You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/docker-install-tini.sh

26 lines
Bash

#!/bin/sh
# Figure out latest release via GitHub API
release=$(curl --silent "https://api.github.com/repos/krallin/tini/releases/latest" | jq -r .tag_name)
# _Reliable_ way to get which arch for tini download
arch=$(python <<EOF
from __future__ import print_function
import platform
processor = platform.machine()
if processor == 'aarch64':
print('arm64', end='')
elif processor == 'x86 64' or processor == 'x86_64':
print('amd64', end='')
elif processor == 'armv7l':
print('armhf', end='')
EOF
)
# Download/install tini
curl -L https://github.com/krallin/tini/releases/download/$release/tini-static-$arch \
-o /sbin/tini
chmod a+x /sbin/tini