diff --git a/deploy.sh b/deploy.sh index a5b7e66..d0fa7b5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,12 +1,17 @@ #!/bin/bash -LXC_CONT="marw" -MC_USER="mc" -MC_PATH="/home/mc/factions" +if [[ "Eriks-MacBook-Air.local" == `hostname` ]]; then + cp "$1" "../../server/plugins/$2.jar" +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" + 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 \ No newline at end of file