stable-diffusion-ui-podman/init

18 lines
390 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
pkg="/stable-diffusion-ui.pkg.tar.zst"
cfg="/opt/stable-diffusion-ui/config.yaml"
if [[ -f "$pkg" ]]; then
pacman -U --noconfirm --overwrite '/opt/stable-diffusion-ui/*' "$pkg"
rm -vf "$pkg"
fi
if ! [[ -f "$cfg" ]]; then
mv /config.yaml "$cfg" || {
printf 'Failed to move the default config file to %s!\n' "$cfg"
}
fi
exec /usr/bin/stable-diffusion-ui-server