mirror of
https://github.com/NATroutter/egg-hytale.git
synced 2026-03-01 11:21:13 +03:00
Added automatic update variable
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"version": "PLCN_v3",
|
||||
"update_url": "https://raw.githubusercontent.com/NATroutter/egg-hytale/refs/heads/main/egg-hytale.json"
|
||||
},
|
||||
"exported_at": "2026-01-11T21:39:39+00:00",
|
||||
"exported_at": "2026-01-11T21:41:54+00:00",
|
||||
"name": "Hytale",
|
||||
"author": "contact@natroutter.fi",
|
||||
"uuid": "6594b287-2d7b-4249-bc93-4d40283c57e3",
|
||||
@@ -90,6 +90,19 @@
|
||||
],
|
||||
"sort": 4
|
||||
},
|
||||
{
|
||||
"name": "Automatic Update",
|
||||
"description": "Update the hytale server automaticly",
|
||||
"env_variable": "AUTOMATIC_UPDATE",
|
||||
"default_value": "1",
|
||||
"user_viewable": false,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"required",
|
||||
"boolean"
|
||||
],
|
||||
"sort": 10
|
||||
},
|
||||
{
|
||||
"name": "Backup Directory",
|
||||
"description": "Directory where backups are saved",
|
||||
|
||||
31
start.sh
31
start.sh
@@ -12,22 +12,25 @@
|
||||
|
||||
DOWNLOADER="./hytale-downloader-linux-amd64"
|
||||
|
||||
# Check if the downloader exists
|
||||
if [ ! -f "$DOWNLOADER" ]; then
|
||||
echo "Error: Hytale downloader not found!"
|
||||
echo "Please run the installation script first."
|
||||
exit 1
|
||||
fi
|
||||
# Run automatic update if enabled
|
||||
if [ "${AUTOMATIC_UPDATE}" = "1" ]; then
|
||||
# Check if the downloader exists
|
||||
if [ ! -f "$DOWNLOADER" ]; then
|
||||
echo "Error: Hytale downloader not found!"
|
||||
echo "Please run the installation script first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the downloader is executable
|
||||
if [ ! -x "$DOWNLOADER" ]; then
|
||||
echo "Setting executable permissions..."
|
||||
chmod +x "$DOWNLOADER"
|
||||
fi
|
||||
# Check if the downloader is executable
|
||||
if [ ! -x "$DOWNLOADER" ]; then
|
||||
echo "Setting executable permissions..."
|
||||
chmod +x "$DOWNLOADER"
|
||||
fi
|
||||
|
||||
echo "Starting Hytale downloader..."
|
||||
$DOWNLOADER -check-update
|
||||
$DOWNLOADER
|
||||
echo "Starting Hytale downloader..."
|
||||
$DOWNLOADER -check-update
|
||||
$DOWNLOADER
|
||||
fi
|
||||
|
||||
echo "Starting Hytale server..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user