Skip to content

Commit

Permalink
v9.10
Browse files Browse the repository at this point in the history
- DietPi-Software | Cuberite: Run in new detached foreground mode, to enhacence systemd tracking logs and service status: cuberite/cuberite#5592
  • Loading branch information
MichaIng committed Jan 4, 2025
1 parent 58925ac commit efbbc7b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -8385,28 +8385,27 @@ location = /.well-known/caldav { return 301 /baikal/html/dav.php; }' > /etc/ngi
then
# https://github.com/cuberite/cuberite/blob/master/easyinstall.sh
case $G_HW_ARCH in
3) local path='aarch64/Cuberite.tar.gz';;
10) local path='x86_64/Cuberite.tar.gz';;
*) local path='armhf-raspbian/Cuberite.tar.gz';;
3) local arch='aarch64';;
10) local arch='x86_64';;
*) local arch='armhf-raspbian';;
esac

Download_Install "https://download.cuberite.org/linux-$path" /mnt/dietpi_userdata/cuberite
Download_Install "https://download.cuberite.org/linux-$arch/Cuberite.tar.gz" /mnt/dietpi_userdata/cuberite

# User
Create_User -d /mnt/dietpi_userdata/cuberite cuberite

# Service: Needs to be Type=forking, else it shuts down automatically after startup has finished :/ ...
# Service
cat << '_EOF_' > /etc/systemd/system/cuberite.service
[Unit]
Description=Cuberite (DietPi)
Wants=network-online.target
After=network-online.target

[Service]
Type=forking
User=cuberite
WorkingDirectory=/mnt/dietpi_userdata/cuberite
ExecStart=/mnt/dietpi_userdata/cuberite/Cuberite -d
ExecStart=/mnt/dietpi_userdata/cuberite/Cuberite --detached

[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit efbbc7b

Please sign in to comment.