Skip to content

Commit

Permalink
v8.24
Browse files Browse the repository at this point in the history
- DietPi-Software | Minor install cleanup: Especially avoid doubled update steps when running ./update_webui.sh, which does a git pull and then everything else we do afterwards already/again
  • Loading branch information
MichaIng committed Oct 28, 2023
1 parent 44601d7 commit 9a3e3fe
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -8494,8 +8494,8 @@ _EOF_

if To_Install 53 mineos # MineOS
then
# https://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS-node_(apt-get)
local url='https://github.com/hexparrot/mineos-node.git'
# https://wiki.codeemo.com/install/debian_10.html
local url='https://github.com/hexparrot/mineos-node'
G_CHECK_URL "$url"

# APT deps
Expand All @@ -8509,15 +8509,9 @@ _EOF_
G_EXEC cd /mnt/dietpi_userdata/mineos
if [[ -d 'minecraft' ]]
then
# https://minecraft.codeemo.com/mineoswiki/index.php?title=Updating_the_Webui
# https://wiki.codeemo.com/maint/webui.html#updating-the-webui
G_EXEC cd minecraft
if [[ -x 'update_webui.sh' ]]
then
G_EXEC_OUTPUT=1 G_EXEC ./update_webui.sh
else
G_EXEC_OUTPUT=1 G_EXEC git fetch
G_EXEC_OUTPUT=1 G_EXEC git merge origin/master
fi
G_EXEC_OUTPUT=1 G_EXEC git pull origin master
else
G_EXEC_OUTPUT=1 G_EXEC git clone "$url" minecraft
G_EXEC cd minecraft
Expand All @@ -8532,19 +8526,17 @@ _EOF_

# Install MineOS
G_EXEC_OUTPUT=1 G_EXEC npm i --no-audit
G_EXEC cd "$G_WORKING_DIR"

# Config: Preserve existing
[[ -f '/etc/mineos.conf' ]] || G_EXEC cp /mnt/dietpi_userdata/mineos/minecraft/mineos.conf /etc/mineos.conf
[[ -f '/etc/mineos.conf' ]] || G_EXEC cp mineos.conf /etc/mineos.conf

# Create symlinks for console and userdata dir
G_EXEC ln -sf /mnt/dietpi_userdata/mineos/minecraft/mineos_console.js /usr/local/bin/mineos
G_EXEC mkdir -p /var/games ../serverdata
G_EXEC rm -Rf /var/games/minecraft
G_EXEC mkdir -p /var/games /mnt/dietpi_userdata/mineos/serverdata
G_EXEC ln -s /mnt/dietpi_userdata/mineos/serverdata /var/games/minecraft

# Setup SSL cert
G_EXEC cd /mnt/dietpi_userdata/mineos/minecraft
G_EXEC_OUTPUT=1 G_EXEC ./generate-sslcert.sh
G_EXEC cd "$G_WORKING_DIR"

Expand Down Expand Up @@ -13646,7 +13638,7 @@ _EOF_

if To_Uninstall 53 # MineOS
then
Remove_Service mineos 1 1 # user and group for pre-v6.34
Remove_Service mineos 1 1 # User and group for pre-v6.34
[[ -d '/mnt/dietpi_userdata/mineos' ]] && G_EXEC rm -R /mnt/dietpi_userdata/mineos
[[ -f '/etc/mineos.conf' ]] && G_EXEC rm /etc/mineos.conf
G_EXEC rm -Rf /var/games/minecraft /usr/local/bin/mineos # Symlinks
Expand Down

0 comments on commit 9a3e3fe

Please sign in to comment.