Compare commits

..

No commits in common. "feature/plugin" and "main" have entirely different histories.

2 changed files with 3 additions and 19 deletions

11
pms-cli
View file

@ -23,7 +23,6 @@ operations:
$(basename ${0}) {-v --verbose} $(basename ${0}) {-v --verbose}
$(basename ${0}) {--init} [servername] [network name] $(basename ${0}) {--init} [servername] [network name]
$(basename ${0}) {--datapack} [servername] [datapack dl url] $(basename ${0}) {--datapack} [servername] [datapack dl url]
$(basename ${0}) {--plugin} [servername] [plugin dl url]
$(basename ${0}) {--start} [servername] [port] (ip) $(basename ${0}) {--start} [servername] [port] (ip)
$(basename ${0}) {--stop} [servername] $(basename ${0}) {--stop} [servername]
$(basename ${0}) {--restart} [servername] [port] (ip) $(basename ${0}) {--restart} [servername] [port] (ip)
@ -34,8 +33,8 @@ operations:
function version() { function version() {
echo -e "Minecraft Podman Server v${PKGVER} echo -e "Minecraft Podman Server v${PKGVER}
Copyright (C) 2025 Noveria Network Copyright (C) 2024 Noveria Network
This program may be freely redistributed under This program may be freely redistributed under
the terms of the ${LICENSE}" the terms of the ${LICENSE}"
} }
@ -45,7 +44,7 @@ the terms of the ${LICENSE}"
### ###
OPT_SHORT="hVv" OPT_SHORT="hVv"
OPT_LONG="help,version,verbose,init:,datapack:,plugin:,start:,stop:,restart:,attach:,reset:,delete:" OPT_LONG="help,version,verbose,init:,datapack:,start:,stop:,restart:,attach:,reset:,delete:"
TEMP=$(getopt -o ${OPT_SHORT} --long ${OPT_LONG} -n $(basename ${0}) -- "$@") TEMP=$(getopt -o ${OPT_SHORT} --long ${OPT_LONG} -n $(basename ${0}) -- "$@")
if [ "$?" != 0 ]; then if [ "$?" != 0 ]; then
@ -76,10 +75,6 @@ while true; do
shift shift
datapack "${1}" "${3}" datapack "${1}" "${3}"
;; ;;
--plugin)
shift
plugin "${1}" "${3}"
;;
--start) --start)
shift shift
start "${1}" "${3}" "${4}" start "${1}" "${3}" "${4}"

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
function plugin() {
if [[ ! -d "$(getValueByKey 'PODMAN_DIRECTORY')/${1}" ]]; then
log e "Directory '${1}' does not exist!"
exit 1
fi
local dir="$(getValueByKey 'PODMAN_DIRECTORY')/${1}/data/plugins"
curl -L "${2}" -o "${dir}/($(echo ${2} | awk -F/ '{print $NF}')"
}