MarwCore/deploy.sh

20 lines
432 B
Bash
Raw Normal View History

2018-09-03 02:25:10 +02:00
#!/bin/bash
2018-09-06 11:25:49 +02:00
if [[ "Darwin" == `uname` ]]; then
2018-09-06 09:33:18 +02:00
MC_PATH="../../server"
2018-09-06 11:25:49 +02:00
2018-09-06 09:30:51 +02:00
cp "$1" "../../server/plugins/$2.jar"
2018-09-06 09:33:18 +02:00
"$MC_PATH/cmd.sh" "plugman reload $2"
2018-09-06 09:30:51 +02:00
else
LXC_CONT="marw"
MC_USER="mc"
MC_PATH="/home/mc/factions"
2018-09-03 02:25:10 +02:00
2018-09-06 09:30:51 +02:00
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
2018-09-03 02:25:10 +02:00
exit 0