diff --git a/install_projectzomboid.sh b/install_projectzomboid.sh index 7170c5f..c33e50b 100755 --- a/install_projectzomboid.sh +++ b/install_projectzomboid.sh @@ -269,6 +269,9 @@ function insertAdminWhitelist() { # this is one of the more brittle parts of the pz installation, if any of the schema is changed # we fail fast. however inserting admin passwords natively into db (and hashed) is far better # than the alternative of passing the admin password as a commandline argument to server + ### + ### TODO: KEEP UP TO DATE + ### local adminUserIdResp sqlQuery sqlQuery="CREATE TABLE IF NOT EXISTS [whitelist] ( [id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, @@ -285,7 +288,8 @@ function insertAdminWhitelist() { [ownerid] TEXT NULL, [accesslevel] TEXT NULL, [transactionID] INTEGER NULL, - [displayName] TEXT NULL); + [displayName] TEXT NULL, + [priority] BOOLEAN NULL DEFAULT false); CREATE UNIQUE INDEX IF NOT EXISTS [id] ON [whitelist]([id] ASC); CREATE UNIQUE INDEX IF NOT EXISTS [username] ON [whitelist]([username] ASC); SELECT 'SENTINEL', [id] FROM [whitelist] WHERE [username] = 'admin'; diff --git a/pz_restart_graceful.sh b/pz_restart_graceful.sh index 3c95ac7..cebeb84 100644 --- a/pz_restart_graceful.sh +++ b/pz_restart_graceful.sh @@ -59,6 +59,9 @@ function getPlayerCount() { rconPlayersResponse="$(pz_players)" rconPlayersHeader="$(head -n1 <<< "${rconPlayersResponse}")" # NOTE: if pz changes any of its output to commands this will "break" + ### + ### TODO: KEEP UP TO DATE + ### playerCount="$(sed -E 's/.*players connected \(([0-9]+)\).*/\1/i' <<< "${rconPlayersHeader}")" # we'll make it smart, so if regex fails (same text after processing) we assume there are players diff --git a/pz_startup_test.sh b/pz_startup_test.sh index 302abe1..aa61969 100644 --- a/pz_startup_test.sh +++ b/pz_startup_test.sh @@ -29,6 +29,9 @@ function main() { rconPlayersResponse="$(pz_players)" rconPlayersHeader="$(head -n1 <<< "${rconPlayersResponse}")" # NOTE: if pz changes any of its output to command this will "break" + ### + ### TODO: KEEP UP TO DATE + ### playerCount="$(sed -E 's/.*players connected \(([0-9]+)\).*/\1/i' <<< "${rconPlayersHeader}")" if [[ -z "${playerCount}" || "${rconPlayersHeader}" == "${playerCount}" ]]; then