Private
Public Access
1
0

chore: bump version to 0.3.3 for dpkg and service fixes

This commit is contained in:
2026-05-03 02:35:32 +00:00
parent 1dea4383f1
commit 06d338f41c
4 changed files with 12 additions and 34 deletions

View File

@ -9,31 +9,14 @@ if [ -d "/etc/linux_patch_api" ]; then
echo "Detected existing installation - performing upgrade"
fi
# Create system user if it doesn't exist
if ! getent group linux-patch-api > /dev/null 2>&1; then
echo "Creating group linux-patch-api..."
groupadd --system linux-patch-api
fi
if ! getent passwd linux-patch-api > /dev/null 2>&1; then
echo "Creating user linux-patch-api..."
useradd --system \
--gid linux-patch-api \
--home-dir /var/lib/linux_patch_api \
--no-create-home \
--shell /usr/sbin/nologin \
--comment "Linux Patch API Service" \
linux-patch-api
fi
# Create required directories
mkdir -p /etc/linux_patch_api/certs
mkdir -p /var/lib/linux_patch_api
mkdir -p /var/log/linux_patch_api
# Set proper ownership
chown -R linux-patch-api:linux-patch-api /var/lib/linux_patch_api
chown -R linux-patch-api:linux-patch-api /var/log/linux_patch_api
# Set proper ownership (service runs as root)
chown -R root:root /var/lib/linux_patch_api
chown -R root:root /var/log/linux_patch_api
# Set secure permissions
chmod 750 /etc/linux_patch_api