MarwStuff/deploy_feature.sh
2018-10-05 19:37:53 +02:00

20 lines
477 B
Bash
Executable File

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