fix broken path

This commit is contained in:
eyedeekay
2025-05-21 18:38:00 -04:00
parent 21da0f09d3
commit 2190589cc6
3 changed files with 20 additions and 12 deletions

View File

@ -36,22 +36,12 @@ download:
# Setup git user and directories
setup-user:
@echo "Setting up git user and directories..."
id -u git &>/dev/null || adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
./preinst
mkdir -p $(DATA_PATH)/custom
mkdir -p $(DATA_PATH)/data
mkdir -p $(DATA_PATH)/log
mkdir -p $(CONFIG_PATH)
chown -R git:git $(DATA_PATH)/
chmod -R 750 $(DATA_PATH)/
chown root:git $(CONFIG_PATH)
chmod 770 $(CONFIG_PATH)
./postinst
# Install Gitea binary
install-binary: download

0
install.sh Normal file → Executable file
View File

18
preinst Executable file
View File

@ -0,0 +1,18 @@
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
BINARY_PATH=${BASE}/usr/local/bin/gitea
SYSTEMD_PATH=${BASE}/etc/systemd/system
CONFIG_PATH=${BASE}/etc/gitea
DATA_PATH=${BASE}/var/lib/gitea
echo "id -u git &>/dev/null || adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git"