hoard/entrypoint.sh

18 lines
406 B
Bash
Raw Normal View History

2024-03-14 11:27:44 +00:00
#!/bin/bash
2024-05-02 11:35:13 +00:00
# Check if the user already exists
if id hoard &>/dev/null; then
echo "User hoard already exists."
else
# Create the user
echo "Creating User ${UID:-1000}"
useradd -m -u "${UID:-1000}" hoard || exit 1
fi
2024-03-14 11:27:44 +00:00
2024-05-02 11:35:13 +00:00
# Perform other setup tasks
2024-03-14 11:41:57 +00:00
chown -R hoard /download
2024-05-02 11:35:13 +00:00
mkdir -p /.cache && chown -R hoard /.cache
2024-03-14 11:41:57 +00:00
chown -R hoard /data
2024-03-14 11:27:44 +00:00
2024-05-02 11:35:13 +00:00
# Start the application as the user
su hoard -c /hoard