Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2023-10-24 18:53:02 +00:00
parent f738ec2282
commit 37df3b5430
3 changed files with 12 additions and 17 deletions

16
init
View File

@@ -5,15 +5,13 @@ cfg="/opt/stable-diffusion-ui/config.yaml"
if [[ -f "$pkg" ]]; then
pacman -U --noconfirm --overwrite '/opt/stable-diffusion-ui/*' "$pkg"
if ! [[ -f "$cfg" ]]; then
mv /config.yaml "$cfg" || {
printf 'Failed to move the default config file to %s!\n' "$cfg"
}
fi
chown -R stable-diffusion:stable-diffusion /opt/stable-diffusion-ui
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 su stable-diffusion -c '/usr/bin/stable-diffusion-ui-server'
exec /usr/bin/stable-diffusion-ui-server