Skip to content

Commit 098802a

Browse files
authored
feat: add more functionality to the install scripts
1 parent 63106f7 commit 098802a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/Sergen.Main/Resources/Install.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,31 @@ yes | cp -rf ../* /opt/Sergen
2424
# Reload systemd services and start the service
2525
systemctl daemon-reload
2626
systemctl start Sergen.service
27+
28+
# Check if apt package manager exists on the system
29+
if command -v apt > /dev/null; then
30+
echo "apt found, checking for podman and dotnet6."
31+
32+
# Update package lists
33+
apt update
34+
35+
# Check if podman is installed
36+
if ! dpkg -l | grep -q podman; then
37+
echo "podman not found, installing."
38+
apt install -y podman
39+
else
40+
echo "podman is already installed, skipping installation."
41+
fi
42+
43+
# Check if dotnet6 is installed
44+
if ! dpkg -l | grep -q dotnet6; then
45+
echo "dotnet6 not found, installing."
46+
apt install -y dotnet6
47+
else
48+
echo "dotnet6 is already installed, skipping installation."
49+
fi
50+
51+
echo "podman and dotnet6 installation checks complete."
52+
else
53+
echo "apt not found. Skipping podman and dotnet6 installation."
54+
fi

0 commit comments

Comments
 (0)