#Add plugin on install

4 messages · Page 1 of 1 (latest)

tulip saffron
#

Hey, I want to copy a plugin from a directory on my daemon host to the plugins directory of a newly created minecraft server, during the initial install script. Would adding this to the end of the script be the recommended way of achieving this? This assumes that the install script is being ran in the container directory, hence the setup of "destination_dir". It's not working currently, install finishes but the copy operation does not seem to work.

source_dir="/home/myUser/myPluginDir"
destination_dir="/plugins"
nested_dir="/plugins/myPluginName"

jar_file="myPluginName-1.0-SNAPSHOT_${MINECRAFT_VERSION}.jar"
txt_file="myText.txt"


if [ ! -f "$source_dir/$jar_file" ]; then
    echo "File '$jar_file' does not exist."
    exit 1
fi


if [ ! -f "$source_dir/$txt_file" ]; then
    echo "File '$txt_file' does not exist."
    exit 1
fi


cp "$source_dir/$jar_file" "$destination_dir"


mkdir -p "$nested_dir"


cp "$source_dir/$txt_file" "$nested_dir"```
tulip saffron
#

Bumping this

dim willow
#

Install scripts can't access your hosts file system

pine musk
#

and in the install script it is /mnt/server not /home/container