Bug fixes
This commit is contained in:
parent
86c746776f
commit
8d948d7af6
@ -279,16 +279,19 @@ update() {
|
|||||||
# Kill the server to ensure a smooth update
|
# Kill the server to ensure a smooth update
|
||||||
kill_server -s "${server_id}" >/dev/null 2>&1
|
kill_server -s "${server_id}" >/dev/null 2>&1
|
||||||
|
|
||||||
|
local backup_dir
|
||||||
|
local backup_full_path
|
||||||
local server_directory
|
local server_directory
|
||||||
local server_name
|
local server_name
|
||||||
local server_mods_urls
|
|
||||||
server_name="Server-${server_id}"
|
server_name="Server-${server_id}"
|
||||||
server_directory="${BASE_DIR}/${server_name}"
|
server_directory="${BASE_DIR}/${server_name}"
|
||||||
server_mods_directory="${server_directory}/Mods"
|
backup_dir="${HOME}/Server-Backups/${server_name}"
|
||||||
server_mods_urls="${server_directory}/mods.urls"
|
backup_full_path="${backup_dir}/$(date +%s).tar.gz"
|
||||||
log "debug" "Created mods directory if it didn't exist"
|
log "info" "Backing up server $(important "${server_name}") to $(important "${backup_full_path}"), this may take a while"
|
||||||
mkdir -p "${server_mods_directory}"
|
mkdir -p "${backup_dir}"
|
||||||
|
tar cf - "${server_directory}" -P | pv -s $(du -sb "${server_directory}" | awk '{print $1}') | \
|
||||||
|
gzip > "${backup_full_path}"
|
||||||
|
tar -czf "${server_directory}" "${backup_dir}"/
|
||||||
log "info" "Updating server $(important "${server_name}") located at $(important "${server_directory}")..."
|
log "info" "Updating server $(important "${server_name}") located at $(important "${server_directory}")..."
|
||||||
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 294420 validate +quit
|
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 294420 validate +quit
|
||||||
|
|
||||||
@ -304,7 +307,7 @@ list_servers() {
|
|||||||
-h | -\? | --help)
|
-h | -\? | --help)
|
||||||
printf "Usage: %s\n" \
|
printf "Usage: %s\n" \
|
||||||
"list [OPTIONS]
|
"list [OPTIONS]
|
||||||
--running | -r
|
--running | -r
|
||||||
Lists the currently running 7 Days To Die Servers
|
Lists the currently running 7 Days To Die Servers
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -334,7 +337,7 @@ list_servers() {
|
|||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[[ -z "${picked_option}" ]] &&
|
[[ -z "${picked_option}" ]] &&
|
||||||
log "error" "An option must be passed for list, check list -h" &&
|
log "error" "An option must be passed for list, check list -h" &&
|
||||||
return 1
|
return 1
|
||||||
|
@ -203,7 +203,7 @@ install() {
|
|||||||
list_disks "${available_disks}"
|
list_disks "${available_disks}"
|
||||||
read -p "Select a disk number to install arch linux to: " disk_selected
|
read -p "Select a disk number to install arch linux to: " disk_selected
|
||||||
|
|
||||||
if [ ${disk_selected} -eq ${disk_selected} 2> /dev/null ]; then
|
if ${disk_selected} -eq ${disk_selected} 2> /dev/null; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
log "error" "A number was not passed"
|
log "error" "A number was not passed"
|
||||||
@ -322,7 +322,7 @@ __EOF__
|
|||||||
systemctl enable NetworkManager
|
systemctl enable NetworkManager
|
||||||
__END_CHROOT_CMDS__
|
__END_CHROOT_CMDS__
|
||||||
log "info" "Next steps: update localities if incorrect, add your user, update the root password"
|
log "info" "Next steps: update localities if incorrect, add your user, update the root password"
|
||||||
log "info" "Notice default login is the following, username: $(important "root") password: $(important "toor")"
|
log "info" "Notice default login is the following, username: $(important "root") password: $(important "toor")
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user