Egg Repository

Pterodactyl Community Egg Repository

Wine Generic

a generic egg to run servers with wine

Read Me

Wine Generic

A generic wine image that can be used to install servers that need wine to run. Downloads compressed server files and extracts them to a specified folder in /mnt/server/

I.E. INSTALL_DIR = server/folder will unpack the server into /mnt/server//server/folder/

Install notes

May require a full custom start command. This is on you to figure out what that is.

Yolks
NameTag
Wine (Latest)ghcr.io/ptero-eggs/yolks:wine_latest
Wine (Staging)ghcr.io/ptero-eggs/yolks:wine_staging
Wine (Devel)ghcr.io/ptero-eggs/yolks:wine_devel
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Server Download URLURL to use to download a servers files.DOWNLOAD_URLhttps://beamng-mp.com/server/BeamMP_Server.zipNoNo
Server ExecutableThe server executable to run.SERVER_EXECUTABLEBeamMP-Server.exeYesNo
sub directory to install intofor example is the server needs to get installed into /home/container/server/bin/ use server/bin/INSTALL_DIRNoNo
Install Script
#!/bin/bash
# The wine generic server installer
# This will just pull a download link and unpack it in directory if specified.

apt update -y
apt install -y curl file unzip

if [ ! -d /mnt/server ]; then
    mkdir -p /mnt/server/
fi

cd /mnt/server/

# if an install dir is set then make it and change to it.
if [ ! -z ${INSTALL_DIR} ]; then
    mkdir -p ${INSTALL_DIR}
    cd ${INSTALL_DIR}
fi

# validate server link
if [ ! -z "${DOWNLOAD_URL}" ]; then 
    if curl --output /dev/null --silent --head --fail ${DOWNLOAD_URL}; then
        echo -e "link is valid. setting download link to ${DOWNLOAD_URL}"
        DOWNLOAD_LINK=${DOWNLOAD_URL}
    else        
        echo -e "link is invalid closing out"
        exit 2
    fi
fi

curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*/}

# unpack servver files
FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*/} | cut -d',' -f2 | cut -d' ' -f2)

if [ "$FILETYPE" == "gzip" ]; then
    tar xzvf ${DOWNLOAD_LINK##*/}
elif [ "$FILETYPE" == "Zip" ]; then
    unzip ${DOWNLOAD_LINK##*/}
elif [ "$FILETYPE" == "XZ" ]; then
    tar xvf ${DOWNLOAD_LINK##*/}
else
    echo -e "unknown filetype. Exiting"
    exit 2 
fi

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"