#!/bin/bash
set -e
VAULT=/opt/vault
mkdir -p "$VAULT"
for i in $(seq 1 50); do
    touch "$VAULT/$(openssl rand -hex 16)"
done
BINNAME=$(openssl rand -hex 16)
gcc -O2 -o "$VAULT/$BINNAME" /tmp/checker.c
chown root:root "$VAULT/$BINNAME"
chmod 4755 "$VAULT/$BINNAME"
rm -f /tmp/checker.c
