Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] How about this ?

[DiscordArchive] How about this ?

[DiscordArchive] How about this ?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
05-17-2022, 09:34 PM
#1
Archived author: Tanados • Posted: 2022-05-17T21:34:47.153000+00:00
Original source

How about this ?
Did I need to shutdown server before upgrading it ?
update.txt
rektbyfaith
05-17-2022, 09:34 PM #1

Archived author: Tanados • Posted: 2022-05-17T21:34:47.153000+00:00
Original source

How about this ?
Did I need to shutdown server before upgrading it ?
update.txt

rektbyfaith
Administrator
0
05-17-2022, 09:35 PM
#2
Archived author: Tanados • Posted: 2022-05-17T21:35:54.336000+00:00
Original source

Ty mate it work like charm
rektbyfaith
05-17-2022, 09:35 PM #2

Archived author: Tanados • Posted: 2022-05-17T21:35:54.336000+00:00
Original source

Ty mate it work like charm

rektbyfaith
Administrator
0
05-17-2022, 09:44 PM
#3
Archived author: Revision • Posted: 2022-05-17T21:44:30.069000+00:00
Original source

You need to shut the server down for `make install`, yes. Running cmake and make before that can be done while the server is running.
rektbyfaith
05-17-2022, 09:44 PM #3

Archived author: Revision • Posted: 2022-05-17T21:44:30.069000+00:00
Original source

You need to shut the server down for `make install`, yes. Running cmake and make before that can be done while the server is running.

rektbyfaith
Administrator
0
05-17-2022, 10:26 PM
#4
Archived author: Ruderalis • Posted: 2022-05-17T22:26:09.170000+00:00
Original source

You can actually `make install` then restart the server only at the end of compilation
rektbyfaith
05-17-2022, 10:26 PM #4

Archived author: Ruderalis • Posted: 2022-05-17T22:26:09.170000+00:00
Original source

You can actually `make install` then restart the server only at the end of compilation

rektbyfaith
Administrator
0
05-17-2022, 10:30 PM
#5
Archived author: Revision • Posted: 2022-05-17T22:30:52.694000+00:00
Original source

You run `make -j $(nproc)`, let it finish, stop the server and run `make install` to copy the compiled binaries to the bin folder and start the server back up.
rektbyfaith
05-17-2022, 10:30 PM #5

Archived author: Revision • Posted: 2022-05-17T22:30:52.694000+00:00
Original source

You run `make -j $(nproc)`, let it finish, stop the server and run `make install` to copy the compiled binaries to the bin folder and start the server back up.

rektbyfaith
Administrator
0
05-17-2022, 10:32 PM
#6
Archived author: Revision • Posted: 2022-05-17T22:32:15.387000+00:00
Original source

That is if you have a slow system or need the server back up as soon as possible, for whatever reason.
rektbyfaith
05-17-2022, 10:32 PM #6

Archived author: Revision • Posted: 2022-05-17T22:32:15.387000+00:00
Original source

That is if you have a slow system or need the server back up as soon as possible, for whatever reason.

rektbyfaith
Administrator
0
05-17-2022, 10:36 PM
#7
Archived author: Revision • Posted: 2022-05-17T22:36:32.896000+00:00
Original source

Also, you shouldn't use `while :; do` for that. It's called a forever loop, which wouldn't work in your case.
rektbyfaith
05-17-2022, 10:36 PM #7

Archived author: Revision • Posted: 2022-05-17T22:36:32.896000+00:00
Original source

Also, you shouldn't use `while :; do` for that. It's called a forever loop, which wouldn't work in your case.

rektbyfaith
Administrator
0
05-17-2022, 10:39 PM
#8
Archived author: Revision • Posted: 2022-05-17T22:39:35.428000+00:00
Original source

If there are issues that occur that causes an error, looping it over and over wouldn't be the best way to go. It would just spam the same error over and over again. Errors don't magically fix themselves.

I would suggest adding the following after each command to terminate the script on errors instead, letting you handle the issue before trying again.

```
if [[ $? -ne 0 ]]; then
exit $?
fi
```
rektbyfaith
05-17-2022, 10:39 PM #8

Archived author: Revision • Posted: 2022-05-17T22:39:35.428000+00:00
Original source

If there are issues that occur that causes an error, looping it over and over wouldn't be the best way to go. It would just spam the same error over and over again. Errors don't magically fix themselves.

I would suggest adding the following after each command to terminate the script on errors instead, letting you handle the issue before trying again.

```
if [[ $? -ne 0 ]]; then
exit $?
fi
```

rektbyfaith
Administrator
0
05-17-2022, 10:46 PM
#9
Archived author: Tanados • Posted: 2022-05-17T22:46:34.449000+00:00
Original source

Sometthing like this?
can i add echo within if ?
new_10.txt
rektbyfaith
05-17-2022, 10:46 PM #9

Archived author: Tanados • Posted: 2022-05-17T22:46:34.449000+00:00
Original source

Sometthing like this?
can i add echo within if ?
new_10.txt

rektbyfaith
Administrator
0
05-17-2022, 10:48 PM
#10
Archived author: Revision • Posted: 2022-05-17T22:48:32.742000+00:00
Original source

You should remove all the while loops.

An example of a set of commands, used in my script, would look like this:
```
# Go into the source folder to update it
cd $OPTION_SOURCE_LOCATION

# Fetch all available updates
git fetch --all

# Check to make sure there weren't any errors
if [[ $? -ne 0 ]]; then
# Terminate script on errors
exit $?
fi

# Reset the source code, removing all local changes
git reset --hard origin/master

# Check to make sure there weren't any errors
if [[ $? -ne 0 ]]; then
# Terminate script on errors
exit $?
fi
```
rektbyfaith
05-17-2022, 10:48 PM #10

Archived author: Revision • Posted: 2022-05-17T22:48:32.742000+00:00
Original source

You should remove all the while loops.

An example of a set of commands, used in my script, would look like this:
```
# Go into the source folder to update it
cd $OPTION_SOURCE_LOCATION

# Fetch all available updates
git fetch --all

# Check to make sure there weren't any errors
if [[ $? -ne 0 ]]; then
# Terminate script on errors
exit $?
fi

# Reset the source code, removing all local changes
git reset --hard origin/master

# Check to make sure there weren't any errors
if [[ $? -ne 0 ]]; then
# Terminate script on errors
exit $?
fi
```

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)