MarwCore/deploy.sh
2018-09-06 11:25:49 +02:00

20 lines
432 B
Bash
Executable File

#!/bin/bash
if [[ "Darwin" == `uname` ]]; then
MC_PATH="../../server"
cp "$1" "../../server/plugins/$2.jar"
"$MC_PATH/cmd.sh" "plugman reload $2"
else
LXC_CONT="marw"
MC_USER="mc"
MC_PATH="/home/mc/factions"
lxc file push "$1" "$LXC_CONT$MC_PATH/plugins/$2.jar"
lxc exec $LXC_CONT chown $MC_USER:$MC_USER "$MC_PATH/plugins/$2.jar"
lxc exec $LXC_CONT -- sudo -u $MC_USER "$MC_PATH/cmd.sh" "plugman reload $2"
fi
exit 0