mirror of
https://github.com/Expand-sys/mcbot
synced 2025-12-17 07:12:13 +11:00
aaa
This commit is contained in:
parent
bcf83fe68f
commit
cbbb1bab06
1 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ module.exports = {
|
||||||
channelSend("Server back online!")
|
channelSend("Server back online!")
|
||||||
}
|
}
|
||||||
restarted = 0;
|
restarted = 0;
|
||||||
}).catch((error) => {
|
}).catch(async (error) => {
|
||||||
console.log("Server is offline" + error);
|
console.log("Server is offline" + error);
|
||||||
serverofflinefor += 10
|
serverofflinefor += 10
|
||||||
if(serverofflinefor <= 60){
|
if(serverofflinefor <= 60){
|
||||||
|
|
@ -44,8 +44,8 @@ module.exports = {
|
||||||
}
|
}
|
||||||
if(serverofflinefor == 60 && restarted != 1){
|
if(serverofflinefor == 60 && restarted != 1){
|
||||||
channelSend(`server Offline for 60 seconds Restarting`)
|
channelSend(`server Offline for 60 seconds Restarting`)
|
||||||
const killer = spawn("screen", ['-XS', 'minecraft', 'quit'])
|
const killer = await spawn("screen", ['-XS', 'minecraft', 'quit'])
|
||||||
const mc = spawn("screen", ['-dmS', 'minecraft', '/bin/bash', `${process.env.SERSTARTLOC}/ServerStart.sh`], {
|
const mc = await spawn("screen", ['-dmS', 'minecraft', '/bin/bash', `${process.env.SERSTARTLOC}/ServerStart.sh`], {
|
||||||
cwd: `${process.env.SERSTARTLOC}`
|
cwd: `${process.env.SERSTARTLOC}`
|
||||||
})
|
})
|
||||||
restarted = 1
|
restarted = 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue