mc-cluster/mc-cluster-image/start.sh

21 lines
373 B
Bash
Raw Normal View History

2024-12-06 05:52:08 -05:00
#!/bin/sh
su - mc -c "cd /var/tools/pm2 && pm2 start startServer.json"
# Init mod manager in 15 seconds, allow server to generate first
sleep 15 && sh /var/tools/scripts/init-mod-manager.sh
cd /
# Run the specified commands
con
chmod 755 /home/mc
chown mc:mc /home/mc/* -R
chown mc:mc /home/mc/minecraft/.mod-manager
# get log
su - mc -c "pm2 log"
tail -f /dev/null