20 lines
553 B
Bash
Executable File
20 lines
553 B
Bash
Executable File
#!/bin/bash
|
|
# Simuliert /usr/local/bin/llama-profile für lokale Tests.
|
|
# Setzt nur die Fake-override.conf (kein systemctl, kein whiptail).
|
|
set -e
|
|
D="$(cd "$(dirname "$0")" && pwd)/fake-profile-dir"
|
|
|
|
case "${1:-}" in
|
|
fast|medium|long) ;;
|
|
*) echo "Usage: fake-llama-profile {fast|medium|long}"; exit 1 ;;
|
|
esac
|
|
|
|
if [ -f /tmp/fake-profile-fail ] \
|
|
&& [ "$(cat /tmp/fake-profile-fail)" = "$1" ]; then
|
|
echo "fake: simulierter Profilfehler für '$1'"
|
|
exit 42
|
|
fi
|
|
|
|
cp "$D/profile-$1.conf.disabled" "$D/override.conf"
|
|
echo "fake: Profil '$1' gesetzt"
|