mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 15:10:22 +00:00
install
This commit is contained in:
parent
7ccbcf09ed
commit
b096d725be
1 changed files with 11 additions and 6 deletions
|
@ -281,23 +281,23 @@ download_source_and_checkimage() {
|
||||||
echo "$echo_prefix_source Download Websoft9 source code from $artifact_url/$source_zip"
|
echo "$echo_prefix_source Download Websoft9 source code from $artifact_url/$source_zip"
|
||||||
|
|
||||||
find . -type f -name "websoft9*.zip*" -exec rm -f {} \;
|
find . -type f -name "websoft9*.zip*" -exec rm -f {} \;
|
||||||
|
rm -rf /tmp/$source_unzip
|
||||||
|
|
||||||
wget "$artifact_url/$source_zip"
|
wget -P /tmp "$artifact_url/$source_zip"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to download source package."
|
echo "Failed to download source package."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## unzip and check image
|
## unzip and check image
|
||||||
rm -rf /tmp/$source_unzip
|
sudo unzip -o "/tmp/$source_zip" -d /tmp > /dev/null
|
||||||
sudo unzip -o "$source_zip" -d /tmp > /dev/null
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to unzip source package."
|
echo "Failed to unzip source package."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /tmp/$source_unzip/docker
|
cd /tmp/$source_unzip/docker
|
||||||
docker-compose pull
|
docker compose pull
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
||||||
echo "Can not pull images from docker hub, set mirrors...."
|
echo "Can not pull images from docker hub, set mirrors...."
|
||||||
|
@ -330,7 +330,7 @@ download_source_and_checkimage() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /tmp/$source_unzip
|
rm -rf /tmp/$source_unzip
|
||||||
sudo unzip -o "$source_zip" -d "$install_path" > /dev/null
|
sudo unzip -o "/tmp/$source_zip" -d "$install_path" > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to unzip source package."
|
echo "Failed to unzip source package."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -342,7 +342,7 @@ download_source_and_checkimage() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$source_zip" "$install_path/$source_unzip"
|
rm -rf "/tmp/$source_zip" "$install_path/$source_unzip"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,6 +442,11 @@ install_backends() {
|
||||||
sudo docker exec -i websoft9-apphub apphub setconfig --section initial_apps --key keys --value "$apps"
|
sudo docker exec -i websoft9-apphub apphub setconfig --section initial_apps --key keys --value "$apps"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "/etc/docker/daemon.json.bak" ]; then
|
||||||
|
rm -rf /etc/docker/daemon.json
|
||||||
|
mv /etc/docker/daemon.json.bak /etc/docker/daemon.json
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_systemd() {
|
install_systemd() {
|
||||||
|
|
Loading…
Reference in a new issue