stable-diffusion-ui-podman/init
fbt 37df3b5430 Tweaks
Signed-off-by: fbt <fbt@fleshless.org>
2023-10-24 18:53:02 +00:00

18 lines
390 B
Bash
Executable File

#!/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