From 77f942932575c0e86b098981470cd3487c277cb5 Mon Sep 17 00:00:00 2001 From: trogdor Date: Sun, 9 Nov 2025 13:09:41 -0800 Subject: [PATCH 01/22] feat: Support ntfy alerts (#4779) * feat: default cfg * feat: add alert_ntfy call * feat: init alert_ntfy * fix: ntfy alert should be off by default * fix: add alert_ntfy to core modules * feat: add ntfy to all default configs --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/acserver/_default.cfg | 10 ++ .../config-lgsm/ahl2server/_default.cfg | 10 ++ .../config-lgsm/ahlserver/_default.cfg | 10 ++ .../config-lgsm/arkserver/_default.cfg | 10 ++ .../config-lgsm/arma3server/_default.cfg | 10 ++ .../config-lgsm/armarserver/_default.cfg | 10 ++ .../config-lgsm/atsserver/_default.cfg | 10 ++ .../config-lgsm/avserver/_default.cfg | 10 ++ .../config-lgsm/bb2server/_default.cfg | 10 ++ .../config-lgsm/bbserver/_default.cfg | 10 ++ .../config-lgsm/bdserver/_default.cfg | 10 ++ .../config-lgsm/bf1942server/_default.cfg | 10 ++ .../config-lgsm/bfvserver/_default.cfg | 10 ++ .../config-lgsm/bmdmserver/_default.cfg | 10 ++ .../config-lgsm/boserver/_default.cfg | 10 ++ .../config-lgsm/bsserver/_default.cfg | 10 ++ .../config-lgsm/btlserver/_default.cfg | 10 ++ .../config-lgsm/btserver/_default.cfg | 10 ++ .../config-lgsm/ccserver/_default.cfg | 10 ++ .../config-lgsm/ckserver/_default.cfg | 10 ++ .../config-lgsm/cmwserver/_default.cfg | 10 ++ .../config-lgsm/cod2server/_default.cfg | 10 ++ .../config-lgsm/cod4server/_default.cfg | 10 ++ .../config-lgsm/codserver/_default.cfg | 10 ++ .../config-lgsm/coduoserver/_default.cfg | 10 ++ .../config-lgsm/codwawserver/_default.cfg | 10 ++ .../config-lgsm/colserver/_default.cfg | 10 ++ .../config-lgsm/cs2server/_default.cfg | 20 ++++ .../config-lgsm/csczserver/_default.cfg | 10 ++ .../config-lgsm/csgoserver/_default.cfg | 10 ++ .../config-lgsm/csserver/_default.cfg | 10 ++ .../config-lgsm/cssserver/_default.cfg | 10 ++ .../config-lgsm/ctserver/_default.cfg | 10 ++ .../config-lgsm/dabserver/_default.cfg | 10 ++ .../config-lgsm/dayzserver/_default.cfg | 10 ++ .../config-lgsm/dmcserver/_default.cfg | 10 ++ .../config-lgsm/dodrserver/_default.cfg | 10 ++ .../config-lgsm/dodserver/_default.cfg | 10 ++ .../config-lgsm/dodsserver/_default.cfg | 10 ++ .../config-lgsm/doiserver/_default.cfg | 10 ++ .../config-lgsm/dstserver/_default.cfg | 10 ++ .../config-lgsm/dysserver/_default.cfg | 10 ++ .../config-lgsm/ecoserver/_default.cfg | 10 ++ .../config-lgsm/emserver/_default.cfg | 10 ++ .../config-lgsm/etlserver/_default.cfg | 10 ++ .../config-lgsm/ets2server/_default.cfg | 10 ++ .../config-lgsm/fctrserver/_default.cfg | 10 ++ .../config-lgsm/fofserver/_default.cfg | 10 ++ .../config-lgsm/gmodserver/_default.cfg | 10 ++ .../config-lgsm/hcuserver/_default.cfg | 10 ++ .../config-lgsm/hl2dmserver/_default.cfg | 10 ++ .../config-lgsm/hldmserver/_default.cfg | 10 ++ .../config-lgsm/hldmsserver/_default.cfg | 10 ++ .../config-lgsm/hwserver/_default.cfg | 10 ++ .../config-lgsm/hzserver/_default.cfg | 10 ++ .../config-lgsm/insserver/_default.cfg | 10 ++ .../config-lgsm/inssserver/_default.cfg | 10 ++ .../config-lgsm/iosserver/_default.cfg | 10 ++ .../config-lgsm/jc2server/_default.cfg | 10 ++ .../config-lgsm/jc3server/_default.cfg | 10 ++ .../config-lgsm/jk2server/_default.cfg | 10 ++ .../config-lgsm/kf2server/_default.cfg | 10 ++ .../config-lgsm/kfserver/_default.cfg | 10 ++ .../config-lgsm/l4d2server/_default.cfg | 10 ++ .../config-lgsm/l4dserver/_default.cfg | 10 ++ .../config-lgsm/mcbserver/_default.cfg | 10 ++ .../config-lgsm/mcserver/_default.cfg | 10 ++ .../config-lgsm/mhserver/_default.cfg | 10 ++ .../config-lgsm/mohaaserver/_default.cfg | 10 ++ .../config-lgsm/momserver/_default.cfg | 10 ++ .../config-lgsm/mtaserver/_default.cfg | 10 ++ .../config-lgsm/ndserver/_default.cfg | 10 ++ .../config-lgsm/necserver/_default.cfg | 10 ++ .../config-lgsm/nmrihserver/_default.cfg | 10 ++ .../config-lgsm/ns2cserver/_default.cfg | 10 ++ .../config-lgsm/ns2server/_default.cfg | 10 ++ .../config-lgsm/nsserver/_default.cfg | 10 ++ .../config-lgsm/ohdserver/_default.cfg | 10 ++ .../config-lgsm/onsetserver/_default.cfg | 10 ++ .../config-lgsm/opforserver/_default.cfg | 10 ++ .../config-lgsm/pc2server/_default.cfg | 10 ++ .../config-lgsm/pcserver/_default.cfg | 10 ++ .../config-lgsm/pmcserver/_default.cfg | 10 ++ .../config-lgsm/pvkiiserver/_default.cfg | 10 ++ .../config-lgsm/pvrserver/_default.cfg | 10 ++ .../config-lgsm/pwserver/_default.cfg | 10 ++ .../config-lgsm/pzserver/_default.cfg | 10 ++ .../config-lgsm/q2server/_default.cfg | 10 ++ .../config-lgsm/q3server/_default.cfg | 10 ++ .../config-lgsm/q4server/_default.cfg | 10 ++ .../config-lgsm/qlserver/_default.cfg | 10 ++ .../config-lgsm/qwserver/_default.cfg | 10 ++ .../config-lgsm/ricochetserver/_default.cfg | 10 ++ .../config-lgsm/roserver/_default.cfg | 10 ++ .../config-lgsm/rtcwserver/_default.cfg | 10 ++ .../config-lgsm/rustserver/_default.cfg | 10 ++ .../config-lgsm/rwserver/_default.cfg | 10 ++ .../config-lgsm/sampserver/_default.cfg | 10 ++ .../config-lgsm/sbotsserver/_default.cfg | 10 ++ .../config-lgsm/sbserver/_default.cfg | 10 ++ .../config-lgsm/scpslserver/_default.cfg | 10 ++ .../config-lgsm/scpslsmserver/_default.cfg | 10 ++ .../config-lgsm/sdtdserver/_default.cfg | 10 ++ .../config-lgsm/sfcserver/_default.cfg | 10 ++ .../config-lgsm/sfserver/_default.cfg | 10 ++ .../config-lgsm/smserver/_default.cfg | 10 ++ .../config-lgsm/sof2server/_default.cfg | 10 ++ .../config-lgsm/solserver/_default.cfg | 10 ++ .../config-lgsm/squad44server/_default.cfg | 10 ++ .../config-lgsm/squadserver/_default.cfg | 10 ++ .../config-lgsm/stnserver/_default.cfg | 10 ++ .../config-lgsm/stserver/_default.cfg | 10 ++ .../config-lgsm/svenserver/_default.cfg | 10 ++ .../config-lgsm/terrariaserver/_default.cfg | 10 ++ .../config-lgsm/tf2server/_default.cfg | 10 ++ .../config-lgsm/tfcserver/_default.cfg | 10 ++ .../config-lgsm/tfserver/_default.cfg | 10 ++ .../config-lgsm/tiserver/_default.cfg | 10 ++ .../config-lgsm/ts3server/_default.cfg | 10 ++ .../config-lgsm/tsserver/_default.cfg | 10 ++ .../config-lgsm/tuserver/_default.cfg | 10 ++ .../config-lgsm/twserver/_default.cfg | 10 ++ .../config-lgsm/untserver/_default.cfg | 10 ++ .../config-lgsm/ut2k4server/_default.cfg | 10 ++ .../config-lgsm/ut3server/_default.cfg | 10 ++ .../config-lgsm/ut99server/_default.cfg | 10 ++ .../config-lgsm/utserver/_default.cfg | 10 ++ .../config-lgsm/vhserver/_default.cfg | 10 ++ .../config-lgsm/vintsserver/_default.cfg | 10 ++ .../config-lgsm/vpmcserver/_default.cfg | 10 ++ .../config-lgsm/vsserver/_default.cfg | 10 ++ .../config-lgsm/wetserver/_default.cfg | 10 ++ .../config-lgsm/wfserver/_default.cfg | 10 ++ .../config-lgsm/wmcserver/_default.cfg | 10 ++ .../config-lgsm/wurmserver/_default.cfg | 10 ++ .../config-lgsm/xntserver/_default.cfg | 10 ++ .../config-lgsm/zmrserver/_default.cfg | 10 ++ .../config-lgsm/zpsserver/_default.cfg | 10 ++ lgsm/modules/alert.sh | 13 ++- lgsm/modules/alert_ntfy.sh | 99 +++++++++++++++++++ lgsm/modules/core_modules.sh | 11 ++- 141 files changed, 1509 insertions(+), 4 deletions(-) create mode 100644 lgsm/modules/alert_ntfy.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 154f38c7bd..2c4f8c84ac 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index a98c907016..8e2f9b272b 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -62,6 +62,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 04cc2e6f96..84501a48eb 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 8680c1bad4..0866ac0a0c 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index b0918ef3c7..2db6dc9553 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -73,6 +73,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index 61103d3326..d5b6d0e180 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index f6d1650983..a37b64547b 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 7b225de1ff..5220fa4e7e 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index b9250cc5fd..c00bd7e7d9 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 99262d8e3d..5453a35f1f 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 3c1769fb30..ac5df16ae7 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 30e2f957ad..69c4ba7271 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 2e8aed8f12..7a28076b03 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index e353d57b0d..f4946bf344 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index ae7912ab6d..7eba6c82af 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index d81cde16d6..865e8cf204 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -67,6 +67,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index 28e8b95e3a..a95a7e77c9 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 71c02c3fc8..e12b1dfa36 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 66847b4104..dcd65011dc 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index f54d7cc7fa..35f36dbf5f 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 776b06a1d7..bd81c0cdc5 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 9665a9ba8f..f33d207cf6 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index f9787c3522..e2fee45b16 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 8f1476ad3b..3640967680 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index c405966d47..0a8da94a9d 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index ca0f002d3f..ce6bba88ee 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index cd94e9b371..4a560cebb8 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -51,6 +51,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 66414592a0..56948c77f1 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -62,6 +62,26 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 29001a0982..f5d90a35b3 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 29b3aea10e..6ae89331fc 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -94,6 +94,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 266448e74b..2ca833c876 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 103c308979..a396678ff9 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index ac87d7516a..c90d6125cf 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 3d5015808f..28c4478fd9 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index f09d23c23d..7e84df5343 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -73,6 +73,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 3d74fca4dd..9d40dd6374 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index 0565b94e90..3c16fcdd5e 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index e2419289a4..8f38459114 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index b6973f0a71..4f113a64f9 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 9a06b7b02b..65ee56f1ec 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 2c8de8bd40..7c8f3fa30e 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -60,6 +60,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index fcb37c41af..b65d0ba473 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 0c18318e9a..c68902ffc0 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -53,6 +53,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 1762e51756..e8f537aabc 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 11a408fb8d..04ebe4e23e 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index 6abe98fb30..116de6b6d5 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 284fafaec1..6eeeda6379 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 7ce6303103..857c596a28 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 2cc683d208..852094b7c5 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -68,6 +68,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 0925fe3844..2340506a9a 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 7ce4dd073c..55f1c39185 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -60,6 +60,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 3bddb128e4..84d7ca030d 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 74321c1f48..c1de9618d4 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 7fe1a49694..70c08c204a 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -68,6 +68,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hzserver/_default.cfg b/lgsm/config-default/config-lgsm/hzserver/_default.cfg index 98b6dda1e9..61403a6d26 100644 --- a/lgsm/config-default/config-lgsm/hzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hzserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index cd1d13029f..74760c2e03 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -64,6 +64,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 4049e5e11d..60f1380932 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -67,6 +67,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index ff6764d0b0..30c41d1fa4 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 5a82bbad90..fe3f28dff6 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 62d9cd4ab7..faa4f0a097 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index f238c45fe4..ef0a54ad87 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 8f44458cdb..b6e39b1edc 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 222ba99790..77507e436c 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -62,6 +62,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index a37ef4eb43..5e6dcfc4e5 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index dc22bc8714..4039df8490 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index d7171a3f66..49ac842a62 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -53,6 +53,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index 1288fab95b..20ede8c010 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 197440ab20..4414621fa7 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index dfd87335c1..5784ceedea 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 5834670c94..44eef19e7f 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index d1880ef896..7bba9fc107 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -53,6 +53,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 249556af49..3ef7000cd4 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 8062f8d5f5..6c1f65a39d 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -53,6 +53,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 8757caa6ce..3301604280 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 2f8f47af57..7f4aeb9bce 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 9cec798da4..69aa2486a3 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -66,6 +66,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 3678785197..98fce8ae94 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 26bc3a30c6..6213a365fb 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -60,6 +60,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 0103ef0690..17a6c0767a 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -51,6 +51,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index 93d00fc5cb..7f025a854a 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index d4e6ce1d6b..ad71870c97 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index c36dfaac6f..54dfa40199 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 74e0e7e188..b915a97129 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 1e2ca36608..64ee41bb01 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 374da3dd19..e3f0bc9894 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -59,6 +59,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index 5e848264e4..7359064a0b 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index f830d7cc4c..aa0ca6525a 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 79820d650b..5b40936e1c 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 74b0d11f3e..35e6126512 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q4server/_default.cfg b/lgsm/config-default/config-lgsm/q4server/_default.cfg index d07828e9f7..32293c9556 100644 --- a/lgsm/config-default/config-lgsm/q4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q4server/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 84631b7655..e1c8d2fac7 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 620943c3ee..39cce3204c 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index bb1957de04..b97ff5b7f9 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 0af49a0d4c..10eb081bd5 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 9011bbcedb..b8d3e1eb79 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index cf609a84c7..c5823b5f1a 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -70,6 +70,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 9523dd63b1..2d95710e17 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 870603bb05..3caf0a4f22 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 82d651ec33..2bd5515301 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 3d06b4235b..671e09b313 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index 237bbebe37..02140723bd 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index e54814df2a..1ca04be529 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 0a091dae43..985b29643b 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -53,6 +53,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 831f92353c..4b5c3bc915 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index f71c1a8d41..4e7272b477 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/smserver/_default.cfg b/lgsm/config-default/config-lgsm/smserver/_default.cfg index 306179b9ce..4fd669e9bc 100644 --- a/lgsm/config-default/config-lgsm/smserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/smserver/_default.cfg @@ -61,6 +61,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 140773daf3..70783da4a4 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 8581104ddd..06147b620b 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/squad44server/_default.cfg b/lgsm/config-default/config-lgsm/squad44server/_default.cfg index 80d991f94c..36037a113e 100644 --- a/lgsm/config-default/config-lgsm/squad44server/_default.cfg +++ b/lgsm/config-default/config-lgsm/squad44server/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 99b91b538d..db783c810b 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 70c7d290cc..4fef17c4b5 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index e32bb23030..4aeaa9c8d1 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 4cd97c50ed..24ea8bf66d 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index fc0d291c96..557ad48af7 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 74fd359abe..16a4285f05 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 17787eef5d..ec2e2cade3 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tfserver/_default.cfg b/lgsm/config-default/config-lgsm/tfserver/_default.cfg index 53fde059d1..880e12acb7 100644 --- a/lgsm/config-default/config-lgsm/tfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -74,6 +74,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 4090d85c9b..75aa946f01 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -56,6 +56,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index bacda7aaa4..87cd0dc311 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index 418727ae64..b3e9799d66 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index ba22c5aa6b..a4e7acaf85 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -60,6 +60,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 4d47cb2d17..ea512f271a 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index a556c17581..7dd97e2690 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -64,6 +64,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index ef8fab7315..37b219ece2 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 22817e40c3..1d7ecf2694 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -70,6 +70,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 3343afc816..62b4abc570 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 299d2571a2..401cded1a8 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 76bed1890d..8380e7c166 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -91,6 +91,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 740b3923d5..ed57b6d84b 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -54,6 +54,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 28bc1b2eac..6bccc92fd3 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index c7976b384c..9414c6978f 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index b53a0674c8..fdd42aaf99 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -50,6 +50,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index d59790ca5a..adde083219 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -55,6 +55,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index c9a0a5d527..d5ff2893fe 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -57,6 +57,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 0141e7d7eb..d65df817fb 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -94,6 +94,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index 402e6188f4..d7b85f58a8 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -52,6 +52,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index 391d83bafe..b2c61b9fdf 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -58,6 +58,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index b5a7b3b93c..c43b008b55 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -63,6 +63,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index f2698e3b79..16ba7e9390 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -24,7 +24,7 @@ fn_alert_log() { fn_info_messages_gameserver_resource fn_info_messages_gameserver fn_info_logs - } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1 + } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" >/dev/null 2>&1 } fn_alert_test() { @@ -357,3 +357,14 @@ elif [ -z "${slacktoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then echo -e "* https://docs.linuxgsm.com/alerts/slack" fn_script_error "Slack token not set" fi + +if [ "${ntfyalert}" == "on" ] && [ -n "${ntfytopic}" ]; then + alert_ntfy.sh +elif [ "${ntfyalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "ntfy alerts not enabled" + fn_script_log_warn "ntfy alerts not enabled" +elif [ -z "${ntfytopic}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "ntfy topic not set" + echo -e "* https://docs.linuxgsm.com/alerts/ntfy" + fn_script_error "ntfy topic not set" +fi diff --git a/lgsm/modules/alert_ntfy.sh b/lgsm/modules/alert_ntfy.sh new file mode 100644 index 0000000000..35e3f4c551 --- /dev/null +++ b/lgsm/modules/alert_ntfy.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# LinuxGSM alert_ntfy.sh module +# Author: Daniel Gibbs (Original Structure), rconjoe (ntfy Adaptation) +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends ntfy alert. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Default ntfy server if not set in config +if [ -z "${ntfyserver}" ]; then + ntfyserver="https://ntfy.sh" +fi + +# Construct the target URL +ntfyurl="${ntfyserver}/${ntfytopic}" + +# Determine priority based on alertsound or config override +# ntfy priorities: 1 (min), 2 (low), 3 (default), 4 (high), 5 (max) +if [ -n "${ntfypriority}" ]; then + priority="${ntfypriority}" +elif [ "${alertsound}" == "2" ]; then + # High priority for monitor failures/permissions issues + priority="4" +else + # Default priority for standard notifications + priority="3" +fi + +# Determine tags based on alertemoji or config override +if [ -n "${ntfytags}" ]; then + tags="${ntfytags}" +else + # Use the alert emoji as a tag + tags="${alertemoji}" +fi + +# Construct the message body +message="Server Name: ${servername} +Information: ${alertmessage} +Game: ${gamename} +Server IP: ${alertip}:${port} +Hostname: ${HOSTNAME} +Server Time: $(date)" + +# Add optional links if available +if [ -n "${querytype}" ]; then + message+="\nIs my Game Server Online?: https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" +fi + +# Use alerturl for the click action if available +clickurl="" +if [ -n "${alerturl}" ]; then + message+="\nMore info: ${alerturl}" + clickurl="${alerturl}" +fi + +# Prepare curl command +# Start with base command and add headers +cmd=(curl --connect-timeout 10 -sS -X POST) +cmd+=(-H "Title: ${alerttitle}") +cmd+=(-H "Priority: ${priority}") +cmd+=(-H "Tags: ${tags}") + +# Add icon if available +if [ -n "${alerticon}" ]; then + cmd+=(-H "Icon: ${alerticon}") +fi + +# Add click URL if available +if [ -n "${clickurl}" ]; then + cmd+=(-H "Click: ${clickurl}") +fi + +# Add authentication header if token is provided +if [ -n "${ntfytoken}" ]; then + cmd+=(-H "Authorization: Bearer ${ntfytoken}") +# Add basic auth if username/password provided (and token isn't) +elif [ -n "${ntfyusername}" ] && [ -n "${ntfypassword}" ]; then + cmd+=(-u "${ntfyusername}:${ntfypassword}") +fi + +# Add message body and target URL +cmd+=(-d "${message}" "${ntfyurl}") + +fn_print_dots "Sending ntfy alert to ${ntfyurl}" + +# Execute the command +ntfysend=$("${cmd[@]}") +exitcode=$? + +# Check exit code and response +if [ "${exitcode}" -eq 0 ] && [[ "${ntfysend}" != *"\"code\":"* ]] && [[ "${ntfysend}" != *"401"* ]] && [[ "${ntfysend}" != *"404"* ]]; then + fn_print_ok_nl "Sending ntfy alert to ${ntfyurl}" + fn_script_log_pass "Sending ntfy alert to ${ntfyurl}" +else + fn_print_fail_nl "Sending ntfy alert to ${ntfyurl}: ${ntfysend} (Exit code: ${exitcode})" + fn_script_log_fail "Sending ntfy alert to ${ntfyurl}: ${ntfysend} (Exit code: ${exitcode})" +fi diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index e5dd2cf31b..614f5d019e 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -14,7 +14,7 @@ modulesversion="v25.2.0" core_dl.sh() { modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" else fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" @@ -23,7 +23,7 @@ core_dl.sh() { core_messages.sh() { modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" else fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" @@ -32,7 +32,7 @@ core_messages.sh() { core_legacy.sh() { modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" else fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" @@ -619,6 +619,11 @@ alert_slack.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } + +alert_ntfy.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} # Logs core_logs.sh() { From fc5e723d1715475e8bc823723b02dc3733396423 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Nov 2025 22:11:00 +0000 Subject: [PATCH 02/22] fix(info_messages): Correct IFTTT alert condition check * Updated the IFTTT alert output to only display when the alert is set to "on". * This change ensures that unnecessary output is avoided when the alert is not active. --- lgsm/modules/info_messages.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index cff7467b10..242c6b3372 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -598,7 +598,9 @@ fn_info_messages_script() { echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" fi # IFTTT alert - echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" + if [ "${iftttalert}" == "on" ]; then + echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" + fi # Pushbullet alert if [ "${pushbulletalert}" == "on" ]; then echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" From 31031c609ff56421964c7e099da5dac8e1cb00d9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Nov 2025 23:09:02 +0000 Subject: [PATCH 03/22] feat: update various game server distro compatibility's (#4853) * add compatabilty message * failure * fix(serverlist): Update Vintage Story OS version to ubuntu-24.04 * Corrected the operating system version for `Vintage Story` from `ubuntu-22.04` to `ubuntu-24.04`. * Ensures compatibility with the latest server requirements. * fix(sven): Update dependencies * fix(check_deps): Update support for Ubuntu and Debian versions * Adjusted version checks for supported distributions. * Added specific error messages for unsupported game titles based on OS version. --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/serverlist.csv | 4 ++-- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- lgsm/data/ubuntu-24.04.csv | 2 +- lgsm/modules/check_deps.sh | 20 +++++++++++++++++++- 12 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 9082f1cc82..e0c6ea7e47 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -111,7 +111,7 @@ squad st,libxml2-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 65bc395357..0d26522932 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 43fb4c5a2e..a111c68009 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 3b8121a264..49d7b1d105 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -110,7 +110,7 @@ squad,squadserver,Squad,ubuntu-24.04 squad44,squad44server,Squad 44,ubuntu-24.04 st,stserver,Stationeers,ubuntu-24.04 stn,stnserver,Survive the Nights,ubuntu-24.04 -sven,svenserver,Sven Co-op,ubuntu-20.04 +sven,svenserver,Sven Co-op,ubuntu-24.04 terraria,terrariaserver,Terraria,ubuntu-24.04 tf,tfserver,The Front,ubuntu-24.04 tf2,tf2server,Team Fortress 2,ubuntu-24.04 @@ -126,7 +126,7 @@ ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-24.04 ut3,ut3server,Unreal Tournament 3,ubuntu-24.04 ut99,ut99server,Unreal Tournament 99,ubuntu-24.04 vh,vhserver,Valheim,ubuntu-24.04 -vints,vintsserver,Vintage Story,ubuntu-22.04 +vints,vintsserver,Vintage Story,ubuntu-24.04 vpmc,vpmcserver,Velocity Proxy MC,ubuntu-24.04 vs,vsserver,Vampire Slayer,ubuntu-24.04 wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-24.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index da755fc1f8..844903c3a8 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index b8d996023b..b058c3024d 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 18cb1c457a..dc54ea10f2 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 0d09631f03..46c036e1b5 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 1f1bf371c7..ca84edf295 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 1f1bf371c7..ca84edf295 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index 1217ee49bf..d130d68c48 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -111,7 +111,7 @@ sol squad st,libxml2-utils stn -sven,libssl1.1:i386,zlib1g:i386 +sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 5667876e5e..edcdb6c7b4 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -351,6 +351,8 @@ if [ "${commandname}" == "INSTALL" ]; then fi fi +info_distro.sh + # Will warn user if their distro is no longer supported by the vendor. if [ -n "${distrosupport}" ]; then if [ "${distrosupport}" == "unsupported" ]; then @@ -359,7 +361,23 @@ if [ -n "${distrosupport}" ]; then fi fi -info_distro.sh +# These titles are only supported up to Ubuntu 22.04 (Jammy) and Debian 12 (Bookworm). +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "22.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "12"; }; then + if [ "${shortname}" == "bf1942" ] || [ "${shortname}" == "bfv" ]; then + fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 22.04 or Debian <= 12)." + fn_script_log_fail "${gamename} is not supported on ${distroname}." + core_exit.sh + fi +fi + +# These titles are only supported up to Ubuntu 20.04 and Debian 11 (and Debian-like derivatives). +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "20.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "11"; }; then + if [ "${shortname}" == "onset" ] || [ "${shortname}" == "btl" ]; then + fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 20.04 or Debian <= 11)." + fn_script_log_fail "${gamename} is not supported on ${distroname}." + core_exit.sh + fi +fi if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then # Check that the distro dependency csv file exists. From 3cefc9c0c4b6f6630ba12fb6f6ff9cef9a33e8a5 Mon Sep 17 00:00:00 2001 From: o1rik Date: Sun, 8 Feb 2026 22:52:58 +0100 Subject: [PATCH 04/22] fix(hz): HumanitZ 1.0 new binary path (#4873) --- lgsm/config-default/config-lgsm/hzserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hzserver/_default.cfg b/lgsm/config-default/config-lgsm/hzserver/_default.cfg index 61403a6d26..d2e63e6927 100644 --- a/lgsm/config-default/config-lgsm/hzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hzserver/_default.cfg @@ -163,9 +163,9 @@ glibc="2.17" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/TSSGame" +systemdir="${serverfiles}/HumanitZServer" executabledir="${systemdir}/Binaries/Linux" -executable="./TSSGameServer-Linux-Shipping" +executable="./HumanitZServer-Linux-Shipping" servercfgdir="${systemdir}" servercfg="GameServerSettings.ini" servercfgdefault="GameUserSettings.ini" From 30dcde03cc8dbbcfcc64e12369836de90dda885b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcell=20P=C3=BCnk=C3=B6sd?= Date: Thu, 12 Mar 2026 23:28:12 +0100 Subject: [PATCH 05/22] fix(scpsl): Add libicu76 as a dependency of scpsl (#4869) Co-authored-by: Daniel Gibbs --- lgsm/data/debian-13.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv index 2ca56633f8..e7a622a7e9 100644 --- a/lgsm/data/debian-13.csv +++ b/lgsm/data/debian-13.csv @@ -100,7 +100,7 @@ rw,openjdk-25-jre samp sb sbots -scpsl,mono-complete +scpsl,mono-complete,libicu76 scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf From e1cbee07a53a423b36ed1d3421bb5c6c883c5210 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 12 Mar 2026 22:30:36 +0000 Subject: [PATCH 06/22] chore: synced local '.github/' with remote 'general/.github/' (#4852) --- .github/workflows/action-prettier.yml | 2 +- .github/workflows/action-super-linter.yml | 6 ++++-- .../action-update-copyright-years-in-license-file.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action-prettier.yml b/.github/workflows/action-prettier.yml index a7e0a7172b..f5d51a44ae 100644 --- a/.github/workflows/action-prettier.yml +++ b/.github/workflows/action-prettier.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: persist-credentials: false diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index a2b12fca45..31b2fa9497 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: # super-linter needs the full git history to get the # list of files that changed across commits @@ -41,11 +41,13 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false VALIDATE_JSCPD: false VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_NATURAL_LANGUAGE: false VALIDATE_SHELL_SHFMT: false - VALIDATE_TERRAFORM_TERRASCAN: false + VALIDATE_TRIVY: false VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/action-update-copyright-years-in-license-file.yml b/.github/workflows/action-update-copyright-years-in-license-file.yml index 7ee528ca99..ab1549f0e6 100644 --- a/.github/workflows/action-update-copyright-years-in-license-file.yml +++ b/.github/workflows/action-update-copyright-years-in-license-file.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 persist-credentials: false From fef128fb7d31f01a776ec60e17cb44e8de570563 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 12 Mar 2026 22:37:36 +0000 Subject: [PATCH 07/22] fix (alerts): Alerts on update uses the old game server version not the new one (#4854) * feat: refactor update comparison output for consistency and clarity - Replaced direct echo statements with fn_print functions for uniformity in output formatting across multiple update scripts. - Ensured lockfile creation uses the correct syntax for variable expansion. - Moved lock file to the same location to ensure monitor doesnt reboot at the wrong time - Updated remote build information display to enhance readability and maintain consistency in logging. - Removed unnecessary echo commands to streamline the output process. * Refactor remote build version handling across multiple modules - Updated variable names from 'remotebuildversion' to 'remotebuild' for consistency. - Adjusted logic to check for remote build availability using the new variable name. - Modified output messages to reflect the change in variable naming. - Ensured all modules (update_mc.sh, update_mcb.sh, update_mta.sh, update_pmc.sh, update_ts3.sh, update_ut99.sh, update_vints.sh, update_xnt.sh) are aligned with the new naming convention for better readability and maintainability. * fix(alert): resolve issue with servername not always being listed in title * Moved `info_distro.sh`, `info_game.sh`, and `info_messages.sh` calls to the top of the `fn_alert_log` function for better clarity. * Updated `alerticon` assignment to maintain consistency in alert information handling. * fix(alert_discord): remove "More info" field from Discord alert JSON * Eliminated the "More info" field to streamline the alert message. * This change enhances the clarity of the alert by focusing on essential information. * fix(alert): improve update alert messaging for clarity * Updated alert messages in `fn_alert_update` and `fn_alert_update_failed` for better readability. * Changed alert action from `update-request` to `update-restart-request` in `fn_monitor_check_update_source`. * remove inline * fix(alert): Correct grammar in update alert message * Changed "an LinuxGSM update" to "a LinuxGSM update" for grammatical accuracy. * typo * fix(alert_discord): Add inline property to "Is my Game Server Online?" field * Ensures proper formatting of the Discord alert message. * Improves the display of the server status information. * fix(pd): increase timeout for termbin.com connection * fix(alert_discord): reorder fields in Discord alert JSON * Changed the order of fields in the Discord alert JSON structure. * Updated the "More info" and "Is my Game Server Online?" fields for better clarity. * revert back to factorio.com Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Standardizes alert messages across platforms Ensures consistency in alert messages across Discord, NTFY, Pushover, Rocketchat, Slack, and Telegram. Updates Discord alerts to include server hostname and time, removes redundant formatting. Standardizes plain-text alert formatting for NTFY. Refactors Pushover messages to use consistent HTML formatting. Streamlines Rocketchat and Slack messages by removing duplicate server info and adding optional link support. * Removes Hostname from alert messages Removes the Hostname field from various alert messages (Discord, Gotify, IFTTT, ntfy, Pushbullet, Pushover, Rocketchat, Slack, Telegram). The hostname was deemed redundant or unnecessary in the context of these alerts. Relates to #4696 * Configures shellcheckrc filename Configures the Super-Linter action to use `.shellcheckrc` as the BASH_FILE_NAME. This ensures that shellcheck uses the correct configuration file for bash script linting. Fixes #4696 * Disables shellcheck errors and removes variable Disables specific shellcheck errors to allow certain coding patterns and removes an unused variable from the super-linter workflow. This improves the linter's signal-to-noise ratio and reduces unnecessary checks. Relates to #4696 * Fixes and improves server list validation scripts Addresses issues in the server list validation scripts: - Fixes potential issues with parsing curl custom arguments in telegram alerts. - Corrects the shortname array generation. - Implements more robust checks for validating game icons. - Ensures the consistency of server counts across different CSV files. * Fixes glibc check and mod selection logic Corrects glibc version comparison to properly handle version strings. Improves mod installation and removal by validating user input against available options, providing a more robust selection process. This prevents errors caused by invalid mod names and enhances the user experience. Updates arithmetic expression syntax for better compatibility. * Fixes cache control for dev-debug mode Updates the handling of cache control headers in dev-debug mode. The `nocache` variable is changed to an array to correctly pass multiple headers to `curl`. This resolves issues with cached versions of files being used when dev-debug is enabled, ensuring that the latest versions are always fetched. Fixes #4696 * Allows spaces in steamcmdcommand variable Parses steamcmdcommand as an array to allow spaces in the variable. This prevents issues when the user wants to pass arguments with spaces to the steamcmd executable. * Addresses various script improvements Addresses multiple improvements across various scripts: - Fixes Valheim unstripped_corlib override by commenting out the lines in the config files. - Improves process identification for source and goldsrc engines using `pgrep`. - Enhances backup file identification using `find` with `-maxdepth 1` and `-type f`. - Fixes glibc version comparison logic in multiple files. - Improves UT2K4 key installation script by using printf for writing the key to the file. - Corrects the mod info extraction logic to correctly identify mod entries. - Improves amxmodx file installation/removal logic to prevent duplicate entries. - Fixes server info retrieval to handle spaces in the server list. Relates to #4696 * Fixes mono repo install exit code check Corrects the mono repo install exit code check to use the dedicated monorepoexitcode variable, ensuring accurate error detection. Updates the exit trap to preserve the original exit status, preventing potential loss of information when handling script termination. * Refactors and reorders core modules Improves module loading by reordering and refactoring the core modules. This change addresses inconsistencies and improves the overall structure of how core modules are handled within the system. Some fix scripts were renamed to match the module name. * Makes scripts executable Changes file permissions to make shell scripts executable. This ensures that the scripts can be run directly. Addresses a pre-existing issue. Related to #4696 * Adds explicit permissions to workflows Specifies explicit permissions for GitHub Actions workflows to enhance security and control access to resources. This ensures that each workflow only has the necessary permissions, following the principle of least privilege. * Fixes output redirection and URL parsing Corrects output redirection in GitHub Actions workflows by enclosing the $GITHUB_OUTPUT variable in quotes, preventing potential issues with variable expansion. Ensures proper URL parsing in workflows by enclosing the URL within quotes, addressing potential parsing errors. Fixes #4696 * Applies code formatting for consistency Applies Prettier formatting to the codebase for improved readability and consistency. Addresses minor code style inconsistencies across several files. * Fixes minor formatting and logic issues Addresses various minor issues including: - Standardizes indentation in `.editorconfig` for different file types. - Simplifies Prettier configuration. - Updates image links in `README.md`. - Ensures newline character at end of `.csv` files. - Corrects a conditional statement in `command_fastdl.sh`. - Corrects a conditional statement in `info_messages.sh`. - Updates server query protocols in `query_gsquery.py`. * Configures and disables linters Adds YAML linting configuration and disables unnecessary linters to streamline the CI/CD process and reduce noise from irrelevant checks. * Improves documentation and linting Updates documentation links to be enclosed in angle brackets, preventing markdown rendering issues. Configures markdownlint to align with repository standards and avoid common false positives. The updated links in the documentation ensure they are correctly interpreted by markdown parsers, improving user experience. The markdownlint configuration fine-tunes linting rules to better match the project's existing style and conventions, reducing noise from irrelevant warnings. * Fixes typos and improves code consistency Addresses various typos and inconsistencies across multiple files, enhancing code readability and maintainability. Adds codespell and flake8 configurations for linting. Relates to #4696 * Excludes workflow files from Prettier formatting Prevents Prettier from formatting workflow files due to GitHub token restrictions, as the token used by the Prettier auto-commit action lacks permissions to update files within the `.github/workflows/` directory. * chore(prettier): format code * Updates Super-Linter configuration Improves Super-Linter's reliability by switching to linting the entire codebase instead of relying on git history. This change also addresses potential transient fetch failures from GitHub. Additionally, this commit expands the ignored paths in codespell and disables some linters to improve performance and reduce false positives. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: dgibbs64 --- .devcontainer/devcontainer.json | 56 ++--- .editorconfig | 17 +- .github/linters/.codespellrc | 11 + .github/linters/.flake8 | 2 + .github/linters/.markdown-lint.yml | 23 ++ .github/linters/.shellcheckrc | 1 + .github/linters/.yaml-lint.yml | 25 +++ .github/pull_request_template.md | 30 +-- .github/workflows/action-super-linter.yml | 8 +- .github/workflows/add-to-project.yml | 2 + .../details-check-generate-matrix.sh | 10 +- .github/workflows/details-check.yml | 7 +- .github/workflows/git-sync.yml | 2 + .github/workflows/potential-duplicates.yml | 4 + .../serverlist-validate-game-icons.sh | 12 +- .github/workflows/serverlist-validate.sh | 9 +- .github/workflows/serverlist-validate.yml | 3 + .github/workflows/trigger-docker-build.yml | 2 + .github/workflows/update-check.yml | 4 +- ...update-copyright-years-in-license-file.yml | 4 + .github/workflows/version-check.sh | 0 .prettierignore | 3 + .prettierrc | 2 +- .prettierrc.json | 2 +- .shellcheckrc | 2 +- .vscode/extensions.json | 20 +- CODE_OF_CONDUCT.md | 30 +-- CONTRIBUTING.md | 133 ++++++----- README.md | 32 +-- .../config-lgsm/armarserver/_default.cfg | 2 +- .../config-lgsm/necserver/_default.cfg | 2 +- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/pwserver/_default.cfg | 2 +- lgsm/data/name-left.csv | 2 +- lgsm/data/name-right.csv | 2 +- lgsm/modules/README.md | 18 +- lgsm/modules/alert.sh | 61 ++++-- lgsm/modules/alert_discord.sh | 21 +- lgsm/modules/alert_email.sh | 0 lgsm/modules/alert_gotify.sh | 2 +- lgsm/modules/alert_ifttt.sh | 2 +- lgsm/modules/alert_ntfy.sh | 26 ++- lgsm/modules/alert_pushbullet.sh | 2 +- lgsm/modules/alert_pushover.sh | 4 +- lgsm/modules/alert_rocketchat.sh | 66 +----- lgsm/modules/alert_slack.sh | 96 +------- lgsm/modules/alert_telegram.sh | 10 +- lgsm/modules/check.sh | 0 lgsm/modules/check_config.sh | 0 lgsm/modules/check_deps.sh | 6 +- lgsm/modules/check_executable.sh | 0 lgsm/modules/check_gamedig.sh | 0 lgsm/modules/check_glibc.sh | 2 +- lgsm/modules/check_ip.sh | 0 lgsm/modules/check_last_update.sh | 1 + lgsm/modules/check_logs.sh | 0 lgsm/modules/check_permissions.sh | 2 +- lgsm/modules/check_root.sh | 0 lgsm/modules/check_status.sh | 0 lgsm/modules/check_steamcmd.sh | 0 lgsm/modules/check_system_dir.sh | 0 lgsm/modules/check_system_requirements.sh | 2 +- lgsm/modules/check_tmuxception.sh | 0 lgsm/modules/check_version.sh | 0 lgsm/modules/command_backup.sh | 0 lgsm/modules/command_check_update.sh | 0 lgsm/modules/command_console.sh | 0 lgsm/modules/command_debug.sh | 2 +- lgsm/modules/command_details.sh | 2 +- lgsm/modules/command_dev_clear_modules.sh | 0 lgsm/modules/command_dev_debug.sh | 0 lgsm/modules/command_dev_detect_deps.sh | 0 lgsm/modules/command_dev_detect_glibc.sh | 2 +- lgsm/modules/command_dev_detect_ldd.sh | 0 .../command_dev_parse_distro_details.sh | 0 .../modules/command_dev_parse_game_details.sh | 0 lgsm/modules/command_dev_query_raw.sh | 8 +- lgsm/modules/command_dev_ui.sh | 0 lgsm/modules/command_fastdl.sh | 2 +- lgsm/modules/command_install.sh | 0 lgsm/modules/command_install_resources_mta.sh | 0 lgsm/modules/command_mods_install.sh | 23 +- lgsm/modules/command_mods_remove.sh | 21 +- lgsm/modules/command_mods_update.sh | 0 lgsm/modules/command_monitor.sh | 4 +- lgsm/modules/command_postdetails.sh | 4 +- lgsm/modules/command_restart.sh | 0 lgsm/modules/command_send.sh | 0 lgsm/modules/command_skeleton.sh | 4 +- lgsm/modules/command_start.sh | 0 lgsm/modules/command_stop.sh | 4 +- lgsm/modules/command_test_alert.sh | 0 lgsm/modules/command_ts3_server_pass.sh | 0 lgsm/modules/command_update.sh | 0 lgsm/modules/command_update_linuxgsm.sh | 39 ++-- lgsm/modules/command_validate.sh | 0 lgsm/modules/command_wipe.sh | 0 lgsm/modules/compress_unreal_maps.sh | 0 lgsm/modules/core_dl.sh | 38 ++-- lgsm/modules/core_exit.sh | 0 lgsm/modules/core_getopt.sh | 0 lgsm/modules/core_github.sh | 0 lgsm/modules/core_legacy.sh | 2 +- lgsm/modules/core_logs.sh | 0 lgsm/modules/core_messages.sh | 2 +- lgsm/modules/core_modules.sh | 206 +++++++++--------- lgsm/modules/core_steamcmd.sh | 22 +- lgsm/modules/core_trap.sh | 6 +- lgsm/modules/fix.sh | 0 lgsm/modules/fix_ark.sh | 4 +- lgsm/modules/fix_arma3.sh | 0 lgsm/modules/fix_av.sh | 0 lgsm/modules/fix_bo.sh | 0 lgsm/modules/fix_cmw.sh | 0 lgsm/modules/fix_csgo.sh | 0 lgsm/modules/fix_dst.sh | 2 +- lgsm/modules/fix_hw.sh | 0 lgsm/modules/fix_ins.sh | 0 lgsm/modules/fix_kf.sh | 0 lgsm/modules/fix_kf2.sh | 0 lgsm/modules/fix_mcb.sh | 0 lgsm/modules/fix_mta.sh | 0 lgsm/modules/fix_nmrih.sh | 0 lgsm/modules/fix_onset.sh | 2 +- lgsm/modules/fix_pvr.sh | 0 lgsm/modules/fix_ro.sh | 0 lgsm/modules/fix_rust.sh | 2 +- lgsm/modules/fix_rw.sh | 0 lgsm/modules/fix_samp.sh | 0 lgsm/modules/fix_sdtd.sh | 0 lgsm/modules/fix_sfc.sh | 0 lgsm/modules/fix_sm.sh | 0 lgsm/modules/fix_sof2.sh | 2 +- lgsm/modules/fix_squad.sh | 0 lgsm/modules/fix_st.sh | 2 +- lgsm/modules/fix_steamcmd.sh | 0 lgsm/modules/fix_terraria.sh | 0 lgsm/modules/fix_tf2.sh | 0 lgsm/modules/fix_ts3.sh | 0 lgsm/modules/fix_unt.sh | 2 +- lgsm/modules/fix_ut.sh | 0 lgsm/modules/fix_ut2k4.sh | 0 lgsm/modules/fix_ut3.sh | 0 lgsm/modules/fix_vh.sh | 6 +- lgsm/modules/fix_wurm.sh | 0 lgsm/modules/fix_xnt.sh | 0 lgsm/modules/fix_zmr.sh | 0 lgsm/modules/info_distro.sh | 14 +- lgsm/modules/info_game.sh | 6 +- lgsm/modules/info_messages.sh | 6 +- lgsm/modules/info_stats.sh | 0 lgsm/modules/install_complete.sh | 0 lgsm/modules/install_config.sh | 4 +- lgsm/modules/install_dst_token.sh | 0 lgsm/modules/install_eula.sh | 0 lgsm/modules/install_factorio_save.sh | 0 lgsm/modules/install_gslt.sh | 0 lgsm/modules/install_header.sh | 0 lgsm/modules/install_logs.sh | 0 lgsm/modules/install_mta_resources.sh | 0 lgsm/modules/install_retry.sh | 0 lgsm/modules/install_server_dir.sh | 0 lgsm/modules/install_server_files.sh | 0 lgsm/modules/install_squad_license.sh | 0 lgsm/modules/install_stats.sh | 0 lgsm/modules/install_steamcmd.sh | 0 lgsm/modules/install_ts3db.sh | 0 lgsm/modules/install_ut2k4_key.sh | 2 +- lgsm/modules/mods_core.sh | 33 ++- lgsm/modules/mods_list.sh | 6 +- lgsm/modules/query_gamedig.sh | 2 +- lgsm/modules/query_gsquery.py | 184 ++++++++++------ lgsm/modules/update_fctr.sh | 100 +++++---- lgsm/modules/update_jk2.sh | 68 +++--- lgsm/modules/update_mc.sh | 76 +++---- lgsm/modules/update_mcb.sh | 76 +++---- lgsm/modules/update_mta.sh | 68 +++--- lgsm/modules/update_pmc.sh | 70 +++--- lgsm/modules/update_steamcmd.sh | 0 lgsm/modules/update_ts3.sh | 68 +++--- lgsm/modules/update_ut99.sh | 70 +++--- lgsm/modules/update_vints.sh | 73 +++---- lgsm/modules/update_xnt.sh | 69 +++--- linuxgsm.sh | 3 +- package.json | 50 ++--- 186 files changed, 1155 insertions(+), 1097 deletions(-) create mode 100644 .github/linters/.codespellrc create mode 100644 .github/linters/.flake8 create mode 100644 .github/linters/.markdown-lint.yml create mode 100644 .github/linters/.shellcheckrc create mode 100644 .github/linters/.yaml-lint.yml mode change 100644 => 100755 .github/workflows/version-check.sh create mode 100644 .prettierignore mode change 100644 => 100755 lgsm/modules/alert.sh mode change 100644 => 100755 lgsm/modules/alert_discord.sh mode change 100644 => 100755 lgsm/modules/alert_email.sh mode change 100644 => 100755 lgsm/modules/alert_gotify.sh mode change 100644 => 100755 lgsm/modules/alert_ifttt.sh mode change 100644 => 100755 lgsm/modules/alert_ntfy.sh mode change 100644 => 100755 lgsm/modules/alert_pushbullet.sh mode change 100644 => 100755 lgsm/modules/alert_pushover.sh mode change 100644 => 100755 lgsm/modules/alert_rocketchat.sh mode change 100644 => 100755 lgsm/modules/alert_slack.sh mode change 100644 => 100755 lgsm/modules/alert_telegram.sh mode change 100644 => 100755 lgsm/modules/check.sh mode change 100644 => 100755 lgsm/modules/check_config.sh mode change 100644 => 100755 lgsm/modules/check_deps.sh mode change 100644 => 100755 lgsm/modules/check_executable.sh mode change 100644 => 100755 lgsm/modules/check_gamedig.sh mode change 100644 => 100755 lgsm/modules/check_glibc.sh mode change 100644 => 100755 lgsm/modules/check_ip.sh mode change 100644 => 100755 lgsm/modules/check_last_update.sh mode change 100644 => 100755 lgsm/modules/check_logs.sh mode change 100644 => 100755 lgsm/modules/check_permissions.sh mode change 100644 => 100755 lgsm/modules/check_root.sh mode change 100644 => 100755 lgsm/modules/check_status.sh mode change 100644 => 100755 lgsm/modules/check_steamcmd.sh mode change 100644 => 100755 lgsm/modules/check_system_dir.sh mode change 100644 => 100755 lgsm/modules/check_system_requirements.sh mode change 100644 => 100755 lgsm/modules/check_tmuxception.sh mode change 100644 => 100755 lgsm/modules/check_version.sh mode change 100644 => 100755 lgsm/modules/command_backup.sh mode change 100644 => 100755 lgsm/modules/command_check_update.sh mode change 100644 => 100755 lgsm/modules/command_console.sh mode change 100644 => 100755 lgsm/modules/command_debug.sh mode change 100644 => 100755 lgsm/modules/command_details.sh mode change 100644 => 100755 lgsm/modules/command_dev_clear_modules.sh mode change 100644 => 100755 lgsm/modules/command_dev_debug.sh mode change 100644 => 100755 lgsm/modules/command_dev_detect_deps.sh mode change 100644 => 100755 lgsm/modules/command_dev_detect_glibc.sh mode change 100644 => 100755 lgsm/modules/command_dev_detect_ldd.sh mode change 100644 => 100755 lgsm/modules/command_dev_parse_distro_details.sh mode change 100644 => 100755 lgsm/modules/command_dev_parse_game_details.sh mode change 100644 => 100755 lgsm/modules/command_dev_query_raw.sh mode change 100644 => 100755 lgsm/modules/command_dev_ui.sh mode change 100644 => 100755 lgsm/modules/command_fastdl.sh mode change 100644 => 100755 lgsm/modules/command_install.sh mode change 100644 => 100755 lgsm/modules/command_install_resources_mta.sh mode change 100644 => 100755 lgsm/modules/command_mods_install.sh mode change 100644 => 100755 lgsm/modules/command_mods_remove.sh mode change 100644 => 100755 lgsm/modules/command_mods_update.sh mode change 100644 => 100755 lgsm/modules/command_monitor.sh mode change 100644 => 100755 lgsm/modules/command_postdetails.sh mode change 100644 => 100755 lgsm/modules/command_restart.sh mode change 100644 => 100755 lgsm/modules/command_send.sh mode change 100644 => 100755 lgsm/modules/command_skeleton.sh mode change 100644 => 100755 lgsm/modules/command_start.sh mode change 100644 => 100755 lgsm/modules/command_stop.sh mode change 100644 => 100755 lgsm/modules/command_test_alert.sh mode change 100644 => 100755 lgsm/modules/command_ts3_server_pass.sh mode change 100644 => 100755 lgsm/modules/command_update.sh mode change 100644 => 100755 lgsm/modules/command_update_linuxgsm.sh mode change 100644 => 100755 lgsm/modules/command_validate.sh mode change 100644 => 100755 lgsm/modules/command_wipe.sh mode change 100644 => 100755 lgsm/modules/compress_unreal_maps.sh mode change 100644 => 100755 lgsm/modules/core_dl.sh mode change 100644 => 100755 lgsm/modules/core_exit.sh mode change 100644 => 100755 lgsm/modules/core_getopt.sh mode change 100644 => 100755 lgsm/modules/core_github.sh mode change 100644 => 100755 lgsm/modules/core_legacy.sh mode change 100644 => 100755 lgsm/modules/core_logs.sh mode change 100644 => 100755 lgsm/modules/core_messages.sh mode change 100644 => 100755 lgsm/modules/core_modules.sh mode change 100644 => 100755 lgsm/modules/core_steamcmd.sh mode change 100644 => 100755 lgsm/modules/core_trap.sh mode change 100644 => 100755 lgsm/modules/fix.sh mode change 100644 => 100755 lgsm/modules/fix_ark.sh mode change 100644 => 100755 lgsm/modules/fix_arma3.sh mode change 100644 => 100755 lgsm/modules/fix_av.sh mode change 100644 => 100755 lgsm/modules/fix_bo.sh mode change 100644 => 100755 lgsm/modules/fix_cmw.sh mode change 100644 => 100755 lgsm/modules/fix_csgo.sh mode change 100644 => 100755 lgsm/modules/fix_dst.sh mode change 100644 => 100755 lgsm/modules/fix_hw.sh mode change 100644 => 100755 lgsm/modules/fix_ins.sh mode change 100644 => 100755 lgsm/modules/fix_kf.sh mode change 100644 => 100755 lgsm/modules/fix_kf2.sh mode change 100644 => 100755 lgsm/modules/fix_mcb.sh mode change 100644 => 100755 lgsm/modules/fix_mta.sh mode change 100644 => 100755 lgsm/modules/fix_nmrih.sh mode change 100644 => 100755 lgsm/modules/fix_onset.sh mode change 100644 => 100755 lgsm/modules/fix_pvr.sh mode change 100644 => 100755 lgsm/modules/fix_ro.sh mode change 100644 => 100755 lgsm/modules/fix_rust.sh mode change 100644 => 100755 lgsm/modules/fix_rw.sh mode change 100644 => 100755 lgsm/modules/fix_samp.sh mode change 100644 => 100755 lgsm/modules/fix_sdtd.sh mode change 100644 => 100755 lgsm/modules/fix_sfc.sh mode change 100644 => 100755 lgsm/modules/fix_sm.sh mode change 100644 => 100755 lgsm/modules/fix_sof2.sh mode change 100644 => 100755 lgsm/modules/fix_squad.sh mode change 100644 => 100755 lgsm/modules/fix_st.sh mode change 100644 => 100755 lgsm/modules/fix_steamcmd.sh mode change 100644 => 100755 lgsm/modules/fix_terraria.sh mode change 100644 => 100755 lgsm/modules/fix_tf2.sh mode change 100644 => 100755 lgsm/modules/fix_ts3.sh mode change 100644 => 100755 lgsm/modules/fix_unt.sh mode change 100644 => 100755 lgsm/modules/fix_ut.sh mode change 100644 => 100755 lgsm/modules/fix_ut2k4.sh mode change 100644 => 100755 lgsm/modules/fix_ut3.sh mode change 100644 => 100755 lgsm/modules/fix_vh.sh mode change 100644 => 100755 lgsm/modules/fix_wurm.sh mode change 100644 => 100755 lgsm/modules/fix_xnt.sh mode change 100644 => 100755 lgsm/modules/fix_zmr.sh mode change 100644 => 100755 lgsm/modules/info_distro.sh mode change 100644 => 100755 lgsm/modules/info_game.sh mode change 100644 => 100755 lgsm/modules/info_messages.sh mode change 100644 => 100755 lgsm/modules/info_stats.sh mode change 100644 => 100755 lgsm/modules/install_complete.sh mode change 100644 => 100755 lgsm/modules/install_config.sh mode change 100644 => 100755 lgsm/modules/install_dst_token.sh mode change 100644 => 100755 lgsm/modules/install_eula.sh mode change 100644 => 100755 lgsm/modules/install_factorio_save.sh mode change 100644 => 100755 lgsm/modules/install_gslt.sh mode change 100644 => 100755 lgsm/modules/install_header.sh mode change 100644 => 100755 lgsm/modules/install_logs.sh mode change 100644 => 100755 lgsm/modules/install_mta_resources.sh mode change 100644 => 100755 lgsm/modules/install_retry.sh mode change 100644 => 100755 lgsm/modules/install_server_dir.sh mode change 100644 => 100755 lgsm/modules/install_server_files.sh mode change 100644 => 100755 lgsm/modules/install_squad_license.sh mode change 100644 => 100755 lgsm/modules/install_stats.sh mode change 100644 => 100755 lgsm/modules/install_steamcmd.sh mode change 100644 => 100755 lgsm/modules/install_ts3db.sh mode change 100644 => 100755 lgsm/modules/install_ut2k4_key.sh mode change 100644 => 100755 lgsm/modules/mods_core.sh mode change 100644 => 100755 lgsm/modules/mods_list.sh mode change 100644 => 100755 lgsm/modules/query_gamedig.sh mode change 100644 => 100755 lgsm/modules/update_fctr.sh mode change 100644 => 100755 lgsm/modules/update_jk2.sh mode change 100644 => 100755 lgsm/modules/update_mc.sh mode change 100644 => 100755 lgsm/modules/update_mcb.sh mode change 100644 => 100755 lgsm/modules/update_mta.sh mode change 100644 => 100755 lgsm/modules/update_pmc.sh mode change 100644 => 100755 lgsm/modules/update_steamcmd.sh mode change 100644 => 100755 lgsm/modules/update_ts3.sh mode change 100644 => 100755 lgsm/modules/update_ut99.sh mode change 100644 => 100755 lgsm/modules/update_vints.sh mode change 100644 => 100755 lgsm/modules/update_xnt.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 506b507541..32c844ac75 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,30 +1,30 @@ { - "name": "BASH Dev Container", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - "features": { - "ghcr.io/devcontainers-community/npm-features/prettier:1": { - "plugins": "prettier-plugin-sh" - }, - "ghcr.io/devcontainers-extra/features/actionlint:1": {}, - "ghcr.io/devcontainers-extra/features/checkov:1": {}, - "ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, - "ghcr.io/devcontainers-extra/features/shellcheck:1": {}, - "ghcr.io/devcontainers-extra/features/yamllint:2": {}, - "ghcr.io/devcontainers/features/github-cli:1": {} - }, - "customizations": { - "vscode": { - "extensions": [ - "DavidAnson.vscode-markdownlint", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "github.vscode-github-actions", - "GitHub.vscode-pull-request-github", - "redhat.vscode-yaml", - "timonwong.shellcheck", - "yzhang.markdown-all-in-one" - ] - } - }, - "postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template" + "name": "BASH Dev Container", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers-community/npm-features/prettier:1": { + "plugins": "prettier-plugin-sh" + }, + "ghcr.io/devcontainers-extra/features/actionlint:1": {}, + "ghcr.io/devcontainers-extra/features/checkov:1": {}, + "ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, + "ghcr.io/devcontainers-extra/features/shellcheck:1": {}, + "ghcr.io/devcontainers-extra/features/yamllint:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "redhat.vscode-yaml", + "timonwong.shellcheck", + "yzhang.markdown-all-in-one" + ] + } + }, + "postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template" } diff --git a/.editorconfig b/.editorconfig index da6e5f2caf..f816affbe2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,21 @@ insert_final_newline = true trim_trailing_whitespace = true # BASH Files -[*.{.sh}] +[*.sh] indent_size = 4 indent_style = tab + +# JSON Files (Biome formatting) +[*.json] +indent_style = tab +indent_size = 2 + +# Steam appmanifest files (Valve ACF format) +[*.acf] +indent_style = tab +indent_size = 4 + +# Python +[*.py] +indent_style = space +indent_size = 4 diff --git a/.github/linters/.codespellrc b/.github/linters/.codespellrc new file mode 100644 index 0000000000..2290668812 --- /dev/null +++ b/.github/linters/.codespellrc @@ -0,0 +1,11 @@ +[codespell] +# Skip data tables that contain many short server identifiers (e.g. "fof", "nd") +skip = + lgsm/data/*.csv, + package-lock.json, + */package-lock.json, + node_modules, + */node_modules/* + +# Ignore common identifiers/acronyms and extensions used throughout LinuxGSM +ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 new file mode 100644 index 0000000000..6deafc2617 --- /dev/null +++ b/.github/linters/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000000..094bbbcd6d --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,23 @@ +# Configuration for markdownlint (used by Super Linter) + +# MD041: README starts with HTML badges in this repo. +MD041: false + +# MD051: GitHub heading anchor generation can differ (emoji, punctuation). +MD051: false + +# MD013: The project documentation frequently contains long URLs/commands. +MD013: false + +# MD033: The main README uses inline HTML for badges. +MD033: false + +# Match existing list formatting in this repo. +MD007: + indent: 4 + +MD030: + ul_single: 3 + ol_single: 2 + ul_multi: 3 + ol_multi: 2 diff --git a/.github/linters/.shellcheckrc b/.github/linters/.shellcheckrc new file mode 100644 index 0000000000..d16f69e0b2 --- /dev/null +++ b/.github/linters/.shellcheckrc @@ -0,0 +1 @@ +disable=SC2154,SC2034 diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000000..c42932a497 --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,25 @@ +extends: default + +rules: + document-start: disable + truthy: disable + + line-length: + max: 200 + level: warning + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + + braces: + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 0 + + empty-lines: + max: 2 + max-start: 0 + max-end: 0 + + comments: + min-spaces-from-content: 1 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4e6d083273..9f6864e57a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,30 +6,30 @@ Fixes #[issue] ## Type of change -- [ ] Bug fix (a change which fixes an issue). -- [ ] New feature (a change which adds functionality). -- [ ] New Server (new server added). -- [ ] Refactor (restructures existing code). -- [ ] Comment update (typo, spelling, explanation, examples, etc). +- [ ] Bug fix (a change which fixes an issue). +- [ ] New feature (a change which adds functionality). +- [ ] New Server (new server added). +- [ ] Refactor (restructures existing code). +- [ ] Comment update (typo, spelling, explanation, examples, etc). ## Checklist PR will not be merged until all steps are complete. -- [ ] This pull request links to an issue. -- [ ] This pull request uses the `develop` branch as its base. -- [ ] This pull request subject follows the Conventional Commits standard. -- [ ] This code follows the style guidelines of this project. -- [ ] I have performed a self-review of my code. -- [ ] I have checked that this code is commented where required. -- [ ] I have provided a detailed enough description of this PR. -- [ ] I have checked if documentation needs updating. +- [ ] This pull request links to an issue. +- [ ] This pull request uses the `develop` branch as its base. +- [ ] This pull request subject follows the Conventional Commits standard. +- [ ] This code follows the style guidelines of this project. +- [ ] I have performed a self-review of my code. +- [ ] I have checked that this code is commented where required. +- [ ] I have provided a detailed enough description of this PR. +- [ ] I have checked if documentation needs updating. ## Documentation If documentation does need updating either update it by creating a PR (preferred) or request a documentation update. -- User docs: https://github.com/GameServerManagers/LinuxGSM-Docs -- Dev docs: https://github.com/GameServerManagers/LinuxGSM-Dev-Docs +- User docs: +- Dev docs: **Thank you for your Pull Request!** diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index 31b2fa9497..de396dcd47 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -27,9 +27,10 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - # super-linter needs the full git history to get the - # list of files that changed across commits - fetch-depth: 0 + # Shallow clone reduces transient fetch failures (HTTP 500) from GitHub. + # We lint the whole codebase instead of relying on git history. + fetch-depth: 1 + fetch-tags: false persist-credentials: false - name: Install Prettier plugins (for summary formatting) @@ -48,6 +49,7 @@ jobs: VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_NATURAL_LANGUAGE: false + VALIDATE_PYTHON_RUFF_FORMAT: false VALIDATE_SHELL_SHFMT: false VALIDATE_TRIVY: false VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index e0b06990f5..e963362645 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -5,6 +5,8 @@ on: - opened - labeled +permissions: {} + jobs: add-to-project: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/details-check-generate-matrix.sh b/.github/workflows/details-check-generate-matrix.sh index bba9e8d5d6..2c08035192 100755 --- a/.github/workflows/details-check-generate-matrix.sh +++ b/.github/workflows/details-check-generate-matrix.sh @@ -14,10 +14,12 @@ while read -r line; do export gamename distro=$(echo "$line" | awk -F, '{ print $4 }') export distro - echo -n "{" >> "shortnamearray.json" - echo -n "\"shortname\":" >> "shortnamearray.json" - echo -n "\"${shortname}\"" >> "shortnamearray.json" - echo -n "}," >> "shortnamearray.json" + { + echo -n "{"; + echo -n "\"shortname\":"; + echo -n "\"${shortname}\""; + echo -n "},"; + } >> "shortnamearray.json" done < <(tail -n +2 serverlist.csv) sed -i '$ s/.$//' "shortnamearray.json" echo -n "]" >> "shortnamearray.json" diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index f52d12c5af..c58aa0ae4a 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -6,6 +6,9 @@ on: branches: - develop +permissions: + contents: read + concurrency: group: details-check-${{ github.ref_name }} cancel-in-progress: true @@ -28,7 +31,7 @@ jobs: run: | shortnamearray=$(cat shortnamearray.json) echo "${shortnamearray}" - echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT + echo -n "matrix=${shortnamearray}" >> "$GITHUB_OUTPUT" details-check: if: github.repository_owner == 'GameServerManagers' @@ -41,7 +44,7 @@ jobs: steps: - name: Download linuxgsm.sh - run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh + run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh - name: Install dependencies run: sudo apt-get install libxml2-utils jq diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 544ba68929..42c660d9b5 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -7,6 +7,8 @@ on: - master - develop +permissions: {} + jobs: gitHub-to-bitbucket: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml index ea0ba23fdd..39a3189d85 100644 --- a/.github/workflows/potential-duplicates.yml +++ b/.github/workflows/potential-duplicates.yml @@ -3,6 +3,10 @@ on: issues: types: - opened + +permissions: + issues: write + jobs: potential-duplicates: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh index 2fdb0ff8f2..b3ba7e4180 100755 --- a/.github/workflows/serverlist-validate-game-icons.sh +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -2,6 +2,8 @@ cd "${datadir}" || exit +exitcode=0 + echo "" echo "Checking that all the game servers listed in serverlist.csv have a shortname-icon.png file" for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do @@ -16,9 +18,11 @@ done echo "" echo "Checking if an unexpected gameicon exists" -for gameicon in $(ls -1 gameicons); do +shopt -s nullglob +for gameiconpath in gameicons/*; do + gameicon="$(basename "${gameiconpath}")" # check if $gameicon is in serverlist.csv - if ! grep -q "${gameicon%-icon.png}" serverlist.csv; then + if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then echo "ERROR: gameicon ${gameicon} is not in serverlist.csv" exitcode=1 else @@ -28,7 +32,7 @@ done echo "" echo "Checking that the number of gameicons matches the number of servers in serverlist.csv" -gameiconcount="$(ls -1 gameicons | wc -l)" +gameiconcount="$(find gameicons -mindepth 1 -maxdepth 1 -type f | wc -l)" serverlistcount="$(tail -n +2 serverlist.csv | wc -l)" if [ "${gameiconcount}" -ne "${serverlistcount}" ]; then echo "ERROR: game icons (${gameiconcount}) does not match serverlist.csv ($serverlistcount)" @@ -37,4 +41,4 @@ else echo "OK: gameiconcount ($gameiconcount) matches serverlistcount ($serverlistcount)" fi -exit ${exitcode} +exit "${exitcode}" diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh index 7d931372d8..3d83d89daf 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/workflows/serverlist-validate.sh @@ -3,12 +3,15 @@ echo "Checking that all the game servers are listed in all csv files" echo "this check will ensure serverlist.csv has the same number of lines (-2 lines) as the other csv files" # count the number of lines in the serverlist.csv cd "${datadir}" || exit + +exitcode=0 serverlistcount="$(tail -n +2 serverlist.csv | wc -l)" echo "serverlistcount: $serverlistcount" # get list of all csv files starting with ubunutu debian centos -csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|rocky).*\.csv$')" +shopt -s nullglob +csvlist=(ubuntu*.csv debian*.csv centos*.csv rhel*.csv almalinux*.csv rocky*.csv) # loop though each csv file and make sure the number of lines is the same as the serverlistcount -for csv in $csvlist; do +for csv in "${csvlist[@]}"; do csvcount="$(wc -l < "${csv}")" csvcount=$((csvcount - 2)) if [ "$csvcount" -ne "$serverlistcount" ]; then @@ -35,4 +38,4 @@ for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do fi done -exit ${exitcode} +exit "${exitcode}" diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index f4a95a039d..c2605b0623 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -3,6 +3,9 @@ on: workflow_dispatch: push: +permissions: + contents: read + jobs: serverlist-validate: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index ab37c882da..390123322f 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -6,6 +6,8 @@ on: types: - published +permissions: {} + jobs: trigger_build_docker-linuxgsm: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index 2f2f7babc2..8863cedc7f 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -6,6 +6,8 @@ on: branches: - develop +permissions: {} + concurrency: group: update-check-${{ github.ref_name }} cancel-in-progress: true @@ -22,7 +24,7 @@ jobs: steps: - name: Download linuxgsm.sh - run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh + run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh - name: Install dependencies run: sudo dpkg --add-architecture i386; sudo apt-get update; diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 3301c9cb73..1123b8cce2 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -4,6 +4,10 @@ on: schedule: - cron: "0 3 1 1 *" # 03:00 AM on January 1 +permissions: + contents: write + pull-requests: write + jobs: update-license-year: if: github.repository_owner == 'GameServerManagers' diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh old mode 100644 new mode 100755 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..7b065e422f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Prettier auto-commit runs with GITHUB_TOKEN (GitHub App). +# GitHub blocks that token from creating/updating anything under .github/workflows. +.github/workflows/** diff --git a/.prettierrc b/.prettierrc index 1902f80216..02d542d509 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,3 @@ { - "plugins": ["prettier-plugin-sh"] + "plugins": ["prettier-plugin-sh"] } diff --git a/.prettierrc.json b/.prettierrc.json index 02d542d509..1902f80216 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,3 +1,3 @@ { - "plugins": ["prettier-plugin-sh"] + "plugins": ["prettier-plugin-sh"] } diff --git a/.shellcheckrc b/.shellcheckrc index 026ee646c7..d16f69e0b2 100644 --- a/.shellcheckrc +++ b/.shellcheckrc @@ -1 +1 @@ -disable=SC2154 +disable=SC2154,SC2034 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d31b65dd26..5c06a83bf5 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,12 +1,12 @@ { - "recommendations": [ - "DavidAnson.vscode-markdownlint", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "github.vscode-github-actions", - "GitHub.vscode-pull-request-github", - "redhat.vscode-yaml", - "timonwong.shellcheck", - "yzhang.markdown-all-in-one" - ] + "recommendations": [ + "DavidAnson.vscode-markdownlint", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "redhat.vscode-yaml", + "timonwong.shellcheck", + "yzhang.markdown-all-in-one" + ] } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index a693252811..fb935a066d 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,24 +17,24 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the - overall community +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community Examples of unacceptable behavior include: -- The use of sexualized language or imagery, and sexual attention or - advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Enforcement Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b549c795b..ab17437f62 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,31 +8,31 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos [Contributing to LinuxGSM](#contributing-to-linuxgsm) -- [Table of Contents](#table-of-contents) -- [Code of Conduct](#code-of-conduct) -- [🎉 Bug/Enhancement Contributions 🐛](#bug-enhancement-contributions) - - [🐛Reporting Bugs](#reporting-bugs) - - [Before Submitting A Bug Report](#before-submitting-a-bug-report) - - [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) - - [🎉Suggesting Features](#suggesting-features) - - [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) - - [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) - - [🎮 Game Server Requests](#game-server-requests) - - [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) - - [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-) - - [🎮 Game Server Specific Issues](#game-server-specific-issues) -- [💻 Code Contributions](#code-contributions) - - [Pull Requests](#pull-requests) - - [Pull Request naming convention](#pull-request-naming-convention) - - [Testing](#testing) - - [Pull Request Status Checks](#pull-request-status-checks) - - [Test Environment](#test-environment) - - [:wine_glass: Styleguides](#-wine-glass--styleguides) - - [Git Commit Messages](#git-commit-messages) - - [BASH Styleguide](#bash-styleguide) -- [:blue_book: Document Contributions](#-blue-book--document-contributions) - - [Documentation Styleguide](#documentation-styleguide) -- [Issue and Pull Request Labels](#issue-and-pull-request-labels) +- [Table of Contents](#table-of-contents) +- [Code of Conduct](#code-of-conduct) +- [🎉 Bug/Enhancement Contributions 🐛](#bug-enhancement-contributions) + - [🐛Reporting Bugs](#reporting-bugs) + - [Before Submitting A Bug Report](#before-submitting-a-bug-report) + - [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) + - [🎉Suggesting Features](#suggesting-features) + - [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) + - [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) + - [🎮 Game Server Requests](#game-server-requests) + - [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) + - [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-) + - [🎮 Game Server Specific Issues](#game-server-specific-issues) +- [💻 Code Contributions](#code-contributions) + - [Pull Requests](#pull-requests) + - [Pull Request naming convention](#pull-request-naming-convention) + - [Testing](#testing) + - [Pull Request Status Checks](#pull-request-status-checks) + - [Test Environment](#test-environment) + - [:wine_glass: Styleguides](#-wine-glass--styleguides) + - [Git Commit Messages](#git-commit-messages) + - [BASH Styleguide](#bash-styleguide) +- [:blue_book: Document Contributions](#-blue-book--document-contributions) + - [Documentation Styleguide](#documentation-styleguide) +- [Issue and Pull Request Labels](#issue-and-pull-request-labels) ## Code of Conduct @@ -48,20 +48,20 @@ Before creating bug reports, please check [this list](https://github.com/GameSer #### Before Submitting A Bug Report -- **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself. -- **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options. -- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. +- **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself. +- **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options. +- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. #### How Do I Submit A (Good) Bug Report? Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose). -- **Use a clear and descriptive title** for the issue to identify the problem. -- **Complete the user story** to give a summary of the issue. -- **Provide basic info** to help us understand the context of the issue. -- **Provide further info** to give specifics and more detail. -- **Give steps to reproduce** the issue, allowing developers to follow steps that lead to the issue. -- **Explain what you expect** to happen, so we know what you think should occur. +- **Use a clear and descriptive title** for the issue to identify the problem. +- **Complete the user story** to give a summary of the issue. +- **Provide basic info** to help us understand the context of the issue. +- **Provide further info** to give specifics and more detail. +- **Give steps to reproduce** the issue, allowing developers to follow steps that lead to the issue. +- **Explain what you expect** to happen, so we know what you think should occur. ### 🎉Suggesting Features @@ -69,19 +69,19 @@ This section guides you through submitting a feature suggestion for LinuxGSM, in #### Before Submitting An Feature Suggestion -- **Check the** [**documentation**]() to confirm that the enhancement doesn’t already exist. -- **Check your** [**LinuxGSM version**](https://docs.linuxgsm.com/commands/update-lgsm)**.** A newer version of LinuxGSM may already have your enhancement. -- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the enhancement has already been suggested. If it has **and the enhancement is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. +- **Check the** [**documentation**]() to confirm that the enhancement doesn’t already exist. +- **Check your** [**LinuxGSM version**](https://docs.linuxgsm.com/commands/update-lgsm)**.** A newer version of LinuxGSM may already have your enhancement. +- **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the enhancement has already been suggested. If it has **and the enhancement is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. #### How Do I Submit A (Good) Feature Suggestion? Features are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose). -- **Use a clear and descriptive title** for the issue to identify the problem. -- **Complete the user story** to give a summary of the issue. -- **Provide basic info** to help us understand the context of the enhancement. -- **Provide further info** to give specifics and more detail. -- **Provide any further reading** materials that might assist in developing the enhancement. +- **Use a clear and descriptive title** for the issue to identify the problem. +- **Complete the user story** to give a summary of the issue. +- **Provide basic info** to help us understand the context of the enhancement. +- **Provide further info** to give specifics and more detail. +- **Provide any further reading** materials that might assist in developing the enhancement. ### 🎮 Game Server Requests @@ -89,14 +89,14 @@ This section guides you through submitting a game server request for LinuxGSM, F #### Before Submitting a Game Server Request -- **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up. -- **Check the game server is supported on Linux**, this does not include Wine servers which we do not support. +- **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up. +- **Check the game server is supported on Linux**, this does not include Wine servers which we do not support. #### How Do I Submit A (Good) Game Server Request? -- The title should be as follows: **[Server Request] Game Name** -- **Provide Steam App ID** if applicable -- **Supply any documentation/how-to guides** for the game server. +- The title should be as follows: **[Server Request] Game Name** +- **Provide Steam App ID** if applicable +- **Supply any documentation/how-to guides** for the game server. ### 🎮 Game Server Specific Issues @@ -114,10 +114,10 @@ A [list](https://docs.linuxgsm.com/support/game-server) of known game developer The process described here has several goals: -- Maintain LinuxGSM quality. -- Fix problems that are important to users. -- Engage the community in working toward the best possible LinuxGSM. -- Enable a sustainable system for LinuxGSM maintainers to review contributions. +- Maintain LinuxGSM quality. +- Fix problems that are important to users. +- Engage the community in working toward the best possible LinuxGSM. +- Enable a sustainable system for LinuxGSM maintainers to review contributions. Please follow these steps to have your contribution considered by the maintainers: @@ -139,24 +139,23 @@ If applied, this commit will _your subject line here_ For example: -- If applied, this commit will **refactor subsystem X for readability** -- If applied, this commit will **update getting started documentation** -- If applied, this commit will **remove deprecated methods** -- If applied, this commit will **release version 1.0.0** -- If applied, this commit will **merge pull request #123 from user/branch** +- If applied, this commit will **refactor subsystem X for readability** +- If applied, this commit will **update getting started documentation** +- If applied, this commit will **remove deprecated methods** +- If applied, this commit will **release version 1.0.0** +- If applied, this commit will **merge pull request #123 from user/branch** Notice how this doesn’t work for the other non-imperative forms: -- If applied, this commit will **fixed bug with Y** -- If applied, this commit will **change the behaviour of X** -- If applied, this commit will **more fixes for broken stuff** -- If applied, this commit will **sweet new API methods** +- If applied, this commit will **fixed bug with Y** +- If applied, this commit will **change the behaviour of X** +- If applied, this commit will **more fixes for broken stuff** +- If applied, this commit will **sweet new API methods** Below is an example of the subject line for a pull request: -**feat(alerts): add slack support to alerts** - -**fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround** +- feat(alerts): add slack support to alerts +- fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround ### Testing @@ -211,10 +210,10 @@ Labels to help pinpoint what the issue or PR relates to. variants: -- _distro_ -- _engine_ -- _game_ -- _info_ +- _distro_ +- _engine_ +- _game_ +- _info_ **outcome** Labels Labels that identify why an issue was closed. diff --git a/README.md b/README.md index 4075a4e3d5..ad88471339 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@

- LinuxGSM - Codacy grade - GitHub Workflow Status - Discord - SteamCMD - MIT License + LinuxGSM + Codacy grade + GitHub Workflow Status + Discord + SteamCMD + MIT License

[LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. @@ -17,21 +17,21 @@ Traditionally game servers are not easy to manage yourself. Admins often have to 100+ game servers supported -- :truck: Installer -- :mag: Monitor -- :phone: Alerts -- :cloud: Updater -- :blue_book: Server Details -- :floppy_disk: Backup -- :computer: Console +- :truck: Installer +- :mag: Monitor +- :phone: Alerts +- :cloud: Updater +- :blue_book: Server Details +- :floppy_disk: Backup +- :computer: Console ## :penguin: Compatibility LinuxGSM will run on popular distros as long as the minimum requirements are met. -- Ubuntu -- Debian -- CentOS +- Ubuntu +- Debian +- CentOS Other distros are likely to work but are not fully tested. diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index d5b6d0e180..e7e8c24f40 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -9,7 +9,7 @@ #### Game Server Settings #### # https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting -# MaxFPS to limit the used Server resouces +# MaxFPS to limit the used Server resources maxfps="60" # Profile Name diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 6c1f65a39d..648e0a40cc 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -8,7 +8,7 @@ #### Game Server Settings #### -## Pre-defined Paramters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters +## Pre-defined Parameters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters worldname="MyWorld" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 7f4aeb9bce..565187394d 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -19,7 +19,7 @@ httppassword="CHANGE_ME" httpport="8080" mods="" serverpassword="" -# Add the following line to the parms if you want a private server. Ensuring +# Add the following line to the params if you want a private server. Ensuring # that the password variable above is not left empty. # -password \"${serverpassword}\" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 69aa2486a3..8964f1dfdd 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -20,7 +20,7 @@ httppassword="CHANGE_ME" httpport="8080" modserverport="27031" serverpassword="" -# Add the following line to the parms if you want a private server. Ensuring +# Add the following line to the params if you want a private server. Ensuring # that the password variable above is not left empty. # -password '${serverpassword}' diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index 7359064a0b..c9052958a8 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -11,7 +11,7 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters servername="LinuxGSM" -# For community servers (serverlist) you need to change these settings (publicip & publicport) in the gameserver config file aswell +# For community servers (serverlist) you need to change these settings (publicip & publicport) in the gameserver config file as well port="8211" steamport="27015" diff --git a/lgsm/data/name-left.csv b/lgsm/data/name-left.csv index 9a47b4bafc..2a95f71064 100644 --- a/lgsm/data/name-left.csv +++ b/lgsm/data/name-left.csv @@ -105,4 +105,4 @@ wonderful xenodochial youthful zealous -zen \ No newline at end of file +zen diff --git a/lgsm/data/name-right.csv b/lgsm/data/name-right.csv index 8e04d85b49..3fdbb9278a 100644 --- a/lgsm/data/name-right.csv +++ b/lgsm/data/name-right.csv @@ -234,4 +234,4 @@ wright wu yalow yonath -zhukovsky \ No newline at end of file +zhukovsky diff --git a/lgsm/modules/README.md b/lgsm/modules/README.md index de008ecfa3..a0aee384cc 100644 --- a/lgsm/modules/README.md +++ b/lgsm/modules/README.md @@ -6,12 +6,12 @@ These modules are scripts that are called upon by the primary script linuxgsm.sh Modules have been named to give an idea of what the function does. -- core: Essential modules that will always run first. -- command: Primary command function. -- check: Runs checks that will either halt on or fix an issue. -- dev: development modules. -- fix: Applies a game server specific fix. -- info: retrieves information from a source such as config file or the OS. -- install: modules related to the installer. -- monitor: modules related to monitor. -- update: modules that update the game server. +- core: Essential modules that will always run first. +- command: Primary command function. +- check: Runs checks that will either halt on or fix an issue. +- dev: development modules. +- fix: Applies a game server specific fix. +- info: retrieves information from a source such as config file or the OS. +- install: modules related to the installer. +- monitor: modules related to monitor. +- update: modules that update the game server. diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh old mode 100644 new mode 100755 index 16ba7e9390..ac7d92d83e --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -10,13 +10,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Generates alert log of the details at the time of the alert. # Used with email alerts. fn_alert_log() { - info_distro.sh - info_game.sh - info_messages.sh if [ -f "${alertlog}" ]; then rm -f "${alertlog:?}" fi - { fn_info_messages_head fn_info_messages_distro @@ -24,7 +20,7 @@ fn_alert_log() { fn_info_messages_gameserver_resource fn_info_messages_gameserver fn_info_logs - } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" >/dev/null 2>&1 + } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1 } fn_alert_test() { @@ -97,45 +93,66 @@ fn_alert_monitor_query() { # Update alerts fn_alert_update() { - fn_script_log_info "Sending alert: ${selfname} has received a game server update: ${localbuild}" + # If previousbuild is set show transition, else fallback to single version. + if [ -n "${previousbuild:-}" ] && [ -n "${localbuild:-}" ]; then + fn_script_log_info "Sending alert: ${selfname} updated: ${previousbuild} -> ${localbuild}" + alertmessage="${selfname} updated: ${previousbuild} -> ${localbuild}." + else + fn_script_log_info "Sending alert: ${selfname} updated to ${localbuild}" + alertmessage="${selfname} updated to ${localbuild}." + fi alertaction="Updated" alertemoji="🎉" alertsound="1" - alertmessage="${selfname} has received a game server update: ${localbuild}." # Green alertcolourhex="#00cd00" alertcolourdec="52480" } -fn_alert_update_request() { - fn_script_log_info "Sending alert: ${selfname} has requested an update and needs to be restarted." - alertaction="Updating" +# Update failure alert +fn_alert_update_failed() { + # Expect updatefailureexpected (target version) and updatefailuregot (actual localbuild) if set + local updateexpected="${updatefailureexpected:-${remotebuild:-unknown}}" + local updategot="${updatefailuregot:-${localbuild:-unknown}}" + fn_script_log_error "Sending alert: ${selfname} update failed: expected ${updateexpected}, got ${updategot}" + alertaction="Update Failed" + alertemoji="❌" + alertsound="2" + alertmessage="${selfname} update failed: expected ${updateexpected}, got ${updategot}. Manual intervention required." + # Red + alertcolourhex="#cd0000" + alertcolourdec="13434880" +} + +fn_alert_update_restart_request() { + fn_script_log_info "Sending alert: ${selfname} restart requested" + alertaction="Restart Requested" alertemoji="🎉" alertsound="1" - alertmessage="${selfname} has requested an update and needs to be restarted." + alertmessage="${selfname} has requested a restart for an update to be applied. Restarting now." # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" } fn_alert_check_update() { - fn_script_log_info "Sending alert: ${gamename} update available: ${remotebuildversion}" - alertaction="Update available" + fn_script_log_info "Sending alert: ${gamename} update available: ${localbuild} -> ${remotebuild}" + alertaction="Update Available" alertemoji="🎉" alertsound="1" - alertmessage="${gamename} update available: ${remotebuildversion}" + alertmessage="${gamename} update available: ${localbuild} -> ${remotebuild}" # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" } fn_alert_update_linuxgsm() { - fn_script_log_info "Sending alert: ${selfname} has received an LinuxGSM update" + fn_script_log_info "Sending alert: ${selfname} has received a LinuxGSM update" alertaction="Updated" alertemoji="🎉" alertsound="1" alertbody="${gamename} update available" - alertmessage="${selfname} has received an LinuxGSM update and been restarted." + alertmessage="${selfname} has received a LinuxGSM update and been restarted." # Green alertcolourhex="#00cd00" alertcolourdec="52480" @@ -197,8 +214,9 @@ fn_alert_info() { alertcolourdec="2003199" } -# Images -alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png" +info_distro.sh +info_game.sh +info_messages.sh if [ "${alert}" == "permissions" ]; then fn_alert_permissions @@ -210,8 +228,10 @@ elif [ "${alert}" == "test" ]; then fn_alert_test elif [ "${alert}" == "update" ]; then fn_alert_update -elif [ "${alert}" == "update-request" ]; then - fn_alert_update_request +elif [ "${alert}" == "update-failed" ]; then + fn_alert_update_failed +elif [ "${alert}" == "update-restart-request" ]; then + fn_alert_update_restart_request elif [ "${alert}" == "check-update" ]; then fn_alert_check_update elif [ "${alert}" == "config" ]; then @@ -237,6 +257,7 @@ else fi alerttitle="${alertemoji} ${alertaction} - ${servername} ${alertemoji}" +alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png" # Generate alert log. fn_alert_log diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh old mode 100644 new mode 100755 index 1440b6a96b..e4bf6307fa --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -43,39 +43,38 @@ json=$( "inline": true }, { - "name": "Server Time", - "value": "$(date)", + "name": "Server IP", + "value": "\`${alertip}:${port}\`", "inline": true }, { - "name": "More info", - "value": "${alerturl}", + "name": "Server Time", + "value": "$(date)", "inline": true } EOF ) -if [ -n "${querytype}" ]; then +if [ -n "${alerturl}" ]; then json+=$( cat << EOF , { - "name": "Is my Game Server Online?", - "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}", + "name": "More info", + "value": "${alerturl}", "inline": true } EOF ) fi -if [ -n "${alerturl}" ]; then +if [ -n "${querytype}" ]; then json+=$( cat << EOF , { - "name": "More info", - "value": "${alerturl}", - "inline": true + "name": "Is my Game Server Online?", + "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" } EOF ) diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh old mode 100644 new mode 100755 index 2f627c774c..6474457460 --- a/lgsm/modules/alert_gotify.sh +++ b/lgsm/modules/alert_gotify.sh @@ -11,7 +11,7 @@ json=$( cat << EOF { "title": "${alerttitle}", - "message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n + "message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n EOF ) diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh old mode 100644 new mode 100755 index aaae3b4e8f..59bb8d9656 --- a/lgsm/modules/alert_ifttt.sh +++ b/lgsm/modules/alert_ifttt.sh @@ -12,7 +12,7 @@ json=$( { "value1": "${selfname}", "value2": "${alerttitle}", - "value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n + "value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n EOF ) diff --git a/lgsm/modules/alert_ntfy.sh b/lgsm/modules/alert_ntfy.sh old mode 100644 new mode 100755 index 35e3f4c551..3f9b0159e9 --- a/lgsm/modules/alert_ntfy.sh +++ b/lgsm/modules/alert_ntfy.sh @@ -35,23 +35,31 @@ else tags="${alertemoji}" fi -# Construct the message body -message="Server Name: ${servername} -Information: ${alertmessage} -Game: ${gamename} -Server IP: ${alertip}:${port} -Hostname: ${HOSTNAME} -Server Time: $(date)" +# Construct the message body (keep formatting consistent with other plain-text alerts) +message="Server Name +${servername} + +Information +${alertmessage} + +Game +${gamename} + +Server IP +${alertip}:${port} + +Server Time +$(date)" # Add optional links if available if [ -n "${querytype}" ]; then - message+="\nIs my Game Server Online?: https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" + message+="\n\nIs my Game Server Online?\nhttps://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" fi # Use alerturl for the click action if available clickurl="" if [ -n "${alerturl}" ]; then - message+="\nMore info: ${alerturl}" + message+="\n\nMore info\n${alerturl}" clickurl="${alerturl}" fi diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh old mode 100644 new mode 100755 index abdfa0bb25..62937b3a73 --- a/lgsm/modules/alert_pushbullet.sh +++ b/lgsm/modules/alert_pushbullet.sh @@ -13,7 +13,7 @@ json=$( "channel_tag": "${channeltag}", "type": "note", "title": "${alerttitle}", - "body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n + "body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n EOF ) diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh old mode 100644 new mode 100755 index 8dc0ce2dc3..3437ba83eb --- a/lgsm/modules/alert_pushover.sh +++ b/lgsm/modules/alert_pushover.sh @@ -22,7 +22,7 @@ else alertpriority="0" fi -message=" Server name
${servername}

Information
${alertmessage}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

" +message=" Server Name
${servername}

Information
${alertmessage}

Game
${gamename}

Server IP
${alertip}:${port}

" if [ -n "${querytype}" ]; then message+="Is my Game Server Online?
Check here

" @@ -32,7 +32,7 @@ if [ -n "${alerturl}" ]; then message+="More info
${alerturl}

" fi -message+="Server Time
$(date)" +message+="Server Time
$(date)" pushoversend=$(curl --connect-timeout 3 -sS \ -F token="${pushovertoken}" \ diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh old mode 100644 new mode 100755 index 35bcf49286..68045221e1 --- a/lgsm/modules/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -40,38 +40,20 @@ json=$( { "short": false, "title": "Server IP", - "value": "${alertip}:${port}" - }, - { - "short": false, - "title": "Hostname", - "value": "${HOSTNAME}" - }, - { - "short": false, - "title": "More info", - "value": "${alerturl}" - }, - { - "short": false, - "title": "Server Time", - "value": "$(date)" + "value": "\`${alertip}:${port}\`" } - ] - } - ] -} EOF ) if [ -n "${querytype}" ]; then json+=$( cat << EOF + , { "short": false, "title": "Is my Game Server Online?", "value": "" - }, + } EOF ) fi @@ -79,55 +61,19 @@ fi if [ -n "${alerturl}" ]; then json+=$( cat << EOF + , { "short": false, "title": "More info", "value": "${alerturl}" - }, + } EOF ) fi json+=$( cat << EOF -{ - "alias": "LinuxGSM", - "text": "*${alerttitle}*", - "attachments": [ - { - "title": "", - "color": "${alertcolourhex}", - "author_name": "LinuxGSM Alert", - "author_link": "https://linuxgsm.com", - "author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "thumb_url": "${alerticon}", - "text": "", - "fields": [ - { - "short": false, - "title": "Server Name", - "value": "${servername}" - }, - { - "short": false, - "title": "Information", - "value": "${alertmessage}" - }, - { - "short": false, - "title": "Game", - "value": "${gamename}" - }, - { - "short": false, - "title": "Server IP", - "value": "${alertip}:${port}" - }, - { - "short": false, - "title": "Hostname", - "value": "${HOSTNAME}" - }, + , { "short": false, "title": "Server Time", diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh old mode 100644 new mode 100755 index 0a1e9015e0..defb1f77fe --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -50,10 +50,6 @@ json=$( "type": "mrkdwn", "text": "*Server IP*\n\`${alertip}:${port}\`" }, - { - "type": "mrkdwn", - "text": "*Hostname*\n${HOSTNAME}" - }, { "type": "mrkdwn", "text": "*Server Time*\n$(date)" @@ -62,41 +58,22 @@ json=$( "accessory": { "type": "image", "image_url": "${alerticon}", - "alt_text": "cute cat" + "alt_text": "LinuxGSM game icon" } - }, - { - "type": "context", - "elements": [ - { - "type": "image", - "image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "alt_text": "LinuxGSM icon" - }, - { - "type": "plain_text", - "text": "Sent by LinuxGSM ${version}", - "emoji": true - } - ] - } - ] - } - ] -} EOF ) if [ -n "${querytype}" ]; then json+=$( cat << EOF + , { "type": "section", "text": { "type": "mrkdwn", "text": "*Is my Game Server Online?*\n" } - }, + } EOF ) fi @@ -104,82 +81,21 @@ fi if [ -n "${alerturl}" ]; then json+=$( cat << EOF + , { "type": "section", "text": { "type": "mrkdwn", "text": "*More info*\n<${alerturl}|${alerturl}>" } - }, + } EOF ) fi json+=$( cat << EOF -{ - "attachments": [ - { - "color": "${alertcolourhex}", - "blocks": [ - { - "type": "header", - "text": { - "type": "mrkdwn", - "text": "${alerttitle}", - "emoji": true - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Server Name*\n${servername}" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Information*\n${alertmessage}" - } - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Game*\n${gamename}" - }, - { - "type": "mrkdwn", - "text": "*Server IP*\n\`${alertip}:${port}\`" - }, - { - "type": "mrkdwn", - "text": "*Hostname*\n${HOSTNAME}" - }, - { - "type": "mrkdwn", - "text": "*Server Time*\n$(date)" - } - ], - "accessory": { - "type": "image", - "image_url": "${alerticon}", - "alt_text": "cute cat" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Server Time*\n${alertmessage}" - } - }, + , { "type": "context", "elements": [ diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh old mode 100644 new mode 100755 index d7c9b84472..ace95d4db9 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -14,7 +14,7 @@ json=$( "message_thread_id": "${telegramthreadid}", "parse_mode": "HTML", "disable_notification": "${telegramdisablenotification}", - "text": "${alerttitle}\n\nServer name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n + "text": "${alerttitle}\n\nServer Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\n EOF ) @@ -43,7 +43,13 @@ EOF ) fn_print_dots "Sending Telegram alert" -telegramsend=$(curl --connect-timeout 3 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") + +curlcustomargs=() +if [ -n "${curlcustomstring}" ]; then + read -r -a curlcustomargs <<< "${curlcustomstring}" +fi + +telegramsend=$(curl --connect-timeout 3 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${curlcustomargs[@]}" "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh old mode 100644 new mode 100755 index edcdb6c7b4..6d572fd406 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -75,11 +75,11 @@ fn_install_mono_repo() { # Run the mono repo install. eval "${cmd}" + monorepoexitcode=$? # Did Mono repo install correctly? if [ "${monoautoinstall}" != "1" ]; then - exitcode=$? - if [ "${exitcode}" -ne 0 ]; then + if [ "${monorepoexitcode}" -ne 0 ]; then fn_print_failure_nl "Unable to install Mono repository." fn_script_log_fail "Unable to install Mono repository." else @@ -234,7 +234,7 @@ fn_install_missing_deps() { } fn_check_loop() { - # Loop though required depenencies checking if they are installed. + # Loop though required dependencies checking if they are installed. for deptocheck in "${array_deps_required[@]}"; do fn_deps_detector done diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_gamedig.sh b/lgsm/modules/check_gamedig.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_glibc.sh b/lgsm/modules/check_glibc.sh old mode 100644 new mode 100755 index 8b3d006584..e49b461f62 --- a/lgsm/modules/check_glibc.sh +++ b/lgsm/modules/check_glibc.sh @@ -17,7 +17,7 @@ elif [ -z "${glibc}" ]; then fn_print_error_nl "Checking glibc: requirement unknown" fn_script_log_error "Checking glibc: requirement unknown" fn_sleep_time_5 -elif [ "$(printf '%s\n'${glibc}'\n' "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then +elif [ "$(printf '%s\n' "${glibc}" "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then fn_print_dots "Checking glibc" fn_print_error_nl "Checking glibc: requirements not met" fn_script_log_error "Checking glibc: requirements not met" diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_last_update.sh b/lgsm/modules/check_last_update.sh old mode 100644 new mode 100755 index 2686c6507d..a68285344a --- a/lgsm/modules/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -11,6 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -f "${lockdir}/${selfname}-last-started.lock" ]; then laststart=$(cat "${lockdir}/${selfname}-last-started.lock") fi + if [ -f "${lockdir}/last-updated.lock" ]; then lastupdate=$(cat "${lockdir}/last-updated.lock") fi diff --git a/lgsm/modules/check_logs.sh b/lgsm/modules/check_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh old mode 100644 new mode 100755 index 4004732f2c..73fba983d3 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -249,7 +249,7 @@ fn_sys_perm_error_process() { fi } -## Run permisions checks when not root. +## Run permissions checks when not root. if [ "$(whoami)" != "root" ]; then fn_check_ownership fn_check_permissions diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_status.sh b/lgsm/modules/check_status.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_steamcmd.sh b/lgsm/modules/check_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh old mode 100644 new mode 100755 index 39cef3a42b..f34190fecf --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -71,7 +71,7 @@ fi if [ "${ramrequirementgb}" ]; then if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then fn_print_dots "Checking RAM" - fn_print_warn_nl "Checking RAM: Minumum RAM requirements not met" + fn_print_warn_nl "Checking RAM: Minimum RAM requirements not met" fn_print_nl "* ${ramrequirementgb}G is required, but only ${physmemtotal} is available." fn_print_nl "* ${gamename} server may fail to run or experience poor performance." fn_sleep_time_5 diff --git a/lgsm/modules/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/check_version.sh b/lgsm/modules/check_version.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_console.sh b/lgsm/modules/command_console.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh old mode 100644 new mode 100755 index a5dae76155..e502605f2d --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -49,7 +49,7 @@ if [ -n "${glibc}" ]; then : elif [ -z "${glibc}" ]; then echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}" - elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then + elif [ "$(printf '%s\n' "${glibc}" "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})" else echo -e "${lightblue}glibc required:\t${green}${glibc}${default}" diff --git a/lgsm/modules/command_details.sh b/lgsm/modules/command_details.sh old mode 100644 new mode 100755 index 8de2ddeb56..047f50c6ff --- a/lgsm/modules/command_details.sh +++ b/lgsm/modules/command_details.sh @@ -29,7 +29,7 @@ fn_info_messages_gameserver_resource fn_info_messages_gameserver fn_info_messages_script fn_info_messages_backup -# Some game servers do not have parms. +# Some game servers do not have params. if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then fn_info_messages_commandlineparms fi diff --git a/lgsm/modules/command_dev_clear_modules.sh b/lgsm/modules/command_dev_clear_modules.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_debug.sh b/lgsm/modules/command_dev_debug.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_detect_deps.sh b/lgsm/modules/command_dev_detect_deps.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh old mode 100644 new mode 100755 index 20398bd478..5af93466ba --- a/lgsm/modules/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -63,7 +63,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 | tee -a "${tmpdir}/detect_glibc_highest.tmp" echo -e "" echo -e "Files requiring GLIBC" - echo -e "Highest verion required: filename" + echo -e "Highest version required: filename" cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" echo -e "" echo -e "All required GLIBC versions" diff --git a/lgsm/modules/command_dev_detect_ldd.sh b/lgsm/modules/command_dev_detect_ldd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_parse_distro_details.sh b/lgsm/modules/command_dev_parse_distro_details.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_parse_game_details.sh b/lgsm/modules/command_dev_parse_game_details.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh old mode 100644 new mode 100755 index b95ef6c334..61b4d7a705 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -249,9 +249,9 @@ echo -e "${bold}${lightyellow}Query Port (${queryport}) - TCP Output${default}" fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do - echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''${default}" + echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'\"${queryip}\"'/'\"${queryport}\"''${default}" echo -e "" - timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' + timeout 3 bash -c 'exec 3<> /dev/tcp/'"${queryip}"'/'"${queryport}"'' querystatus="$?" echo -e "" if [ "${querystatus}" == "0" ]; then @@ -268,9 +268,9 @@ echo -e "${lightgreen}TCP Raw Output${default}" fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do - echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''${default}" + echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'\"${queryip}\"'/'\"${port}\"''${default}" echo -e "" - timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' + timeout 3 bash -c 'exec 3<> /dev/tcp/'"${queryip}"'/'"${port}"'' querystatus="$?" echo -e "" if [ "${querystatus}" == "0" ]; then diff --git a/lgsm/modules/command_dev_ui.sh b/lgsm/modules/command_dev_ui.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh old mode 100644 new mode 100755 index 3b81654440..dfdcc9ec8f --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -219,7 +219,7 @@ fn_fastdl_preview() { core_exit.sh fi - if [ "${engine}" == "source" ]; then + if [ "${engine}" == "source" ]; then echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" elif [ "${engine}" == "goldsrc" ]; then echo -e "about to copy ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_install_resources_mta.sh b/lgsm/modules/command_install_resources_mta.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh old mode 100644 new mode 100755 index e76f3f1fa2..a8f90293b2 --- a/lgsm/modules/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -47,7 +47,7 @@ while [ "${compatiblemodslistindex}" -lt "${#compatiblemodslist[@]}" ]; do echo -e "${displayedmodname} - ${displayedmoddescription} - ${displayedmodsite}" echo -e " * ${cyan}${displayedmodcommand}${default}" # Increment index from the amount of values we just displayed. - let "compatiblemodslistindex+=4" + ((compatiblemodslistindex += 4)) ((totalmodsavailable++)) done @@ -61,16 +61,29 @@ fn_script_log_info "${totalmodsavailable} addons/mods are available for install" ## User selects a mod. echo -e "" -while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; do + +while :; do echo -en "Enter an ${cyan}addon/mod${default} to ${green}install${default} (or exit to abort): " read -r usermodselect # Exit if user says exit or abort. if [ "${usermodselect}" == "exit" ] || [ "${usermodselect}" == "abort" ]; then core_exit.sh - # Supplementary output upon invalid user input. - elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then - fn_print_error2_nl "${usermodselect} is not a valid addon/mod." fi + + validselection=0 + for availablemodcommand in "${availablemodscommands[@]}"; do + if [ "${availablemodcommand}" == "${usermodselect}" ]; then + validselection=1 + break + fi + done + + if [ "${validselection}" -eq 1 ]; then + break + fi + + # Supplementary output upon invalid user input. + fn_print_error2_nl "${usermodselect} is not a valid addon/mod." done # Get mod info. currentmod="${usermodselect}" diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh old mode 100644 new mode 100755 index 589046b111..04240eb60d --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -32,16 +32,29 @@ done echo -e "" # Keep prompting as long as the user input doesn't correspond to an available mod. -while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do + +while :; do echo -en "Enter an ${cyan}addon/mod${default} to ${red}remove${default} (or exit to abort): " read -r usermodselect # Exit if user says exit or abort. if [ "${usermodselect}" == "exit" ] || [ "${usermodselect}" == "abort" ]; then core_exit.sh - # Supplementary output upon invalid user input. - elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then - fn_print_error2_nl "${usermodselect} is not a valid addon/mod." fi + + validselection=0 + for installedmodcommand in "${installedmodslist[@]}"; do + if [ "${installedmodcommand}" == "${usermodselect}" ]; then + validselection=1 + break + fi + done + + if [ "${validselection}" -eq 1 ]; then + break + fi + + # Supplementary output upon invalid user input. + fn_print_error2_nl "${usermodselect} is not a valid addon/mod." done fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}." diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh old mode 100644 new mode 100755 index 5fa3c3000f..7c813aed77 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -164,8 +164,8 @@ fn_monitor_check_update_source() { fn_script_log_info "Checking update: CHECKING" fn_print_ok "Checking update" fn_print_ok_eol_nl - fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted" - alert="update-request" + fn_script_log_info "Checking update: ${selfname} has requested a restart for an update to be applied" + alert="update-restart-request" alert.sh command_restart.sh core_exit.sh diff --git a/lgsm/modules/command_postdetails.sh b/lgsm/modules/command_postdetails.sh old mode 100644 new mode 100755 index 7f5f673043..d029093b5f --- a/lgsm/modules/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -46,7 +46,7 @@ else fn_info_messages_gameserver fn_info_messages_script fn_info_messages_backup - # Some game servers do not have parms. + # Some game servers do not have params. if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then fn_info_messages_commandlineparms fi @@ -59,7 +59,7 @@ fi fn_print_dots "termbin.com" link=$(cat "${postdetailslog}" | { - nc -w 3 termbin.com 9999 + nc -w 10 termbin.com 9999 echo $? > /tmp/nc_exit_status } | tr -d '\n\0') nc_exit_status=$(cat /tmp/nc_exit_status) diff --git a/lgsm/modules/command_restart.sh b/lgsm/modules/command_restart.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh old mode 100644 new mode 100755 index b9f51205af..687790a379 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates an copy of a game servers directorys. +# Description: Creates an copy of a game servers directories. commandname="SKELETON" commandaction="Skeleton" @@ -13,7 +13,7 @@ fn_firstcommand_set fn_print_dots "Creating skeleton directory" check.sh -# Find all directorys and create them in the skel directory +# Find all directories and create them in the skel directory find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null exitcode=$? if [ "${exitcode}" -ne 0 ]; then diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh old mode 100644 new mode 100755 index f1edc35444..ab827314d8 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -16,7 +16,7 @@ fn_stop_graceful_ctrlc() { fn_script_log_info "Graceful: CTRL+c" # Sends CTRL+c. tmux -L "${socketname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 - # Waits up to 30 seconds giving the server time to shutdown gracefuly. + # Waits up to 30 seconds giving the server time to shutdown gracefully. for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then @@ -293,7 +293,7 @@ fn_stop_graceful_avorion() { fn_sleep_time_5 # Sends /quit. tmux -L "${socketname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 - # Waits up to 30 seconds giving the server time to shutdown gracefuly. + # Waits up to 30 seconds giving the server time to shutdown gracefully. for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then diff --git a/lgsm/modules/command_test_alert.sh b/lgsm/modules/command_test_alert.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_ts3_server_pass.sh b/lgsm/modules/command_ts3_server_pass.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh old mode 100644 new mode 100755 index 3299be5094..3fd4cc681e --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -16,8 +16,9 @@ info_distro.sh info_game.sh # Prevent github from using a cached version of the file if dev-debug is enabled. +nocache=() if [ -f "${rootdir}/.dev-debug" ]; then - nocache="-H \"Cache-Control: no-cache\" -H \"Pragma: no-cache\"" + nocache=(-H "Cache-Control: no-cache" -H "Pragma: no-cache") fi fn_script_log_info "Updating LinuxGSM" @@ -26,10 +27,10 @@ fn_print_dots "Selecting repo" fn_script_log_info "Selecting repo" # Select remotereponame -curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null +curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null exitcode=$? if [ "${exitcode}" -ne "0" ]; then - curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null exitcode=$? if [ "${exitcode}" -ne "0" ]; then fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" @@ -47,9 +48,9 @@ fi # Check linuxsm.sh echo -en "checking ${remotereponame} script [ ${italic}linuxgsm.sh${default} ]\c" if [ "${remotereponame}" == "GitHub" ]; then - curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null else - curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null fi exitcode=$? if [ "${exitcode}" -ne 0 ]; then @@ -60,9 +61,9 @@ if [ "${exitcode}" -ne 0 ]; then fi if [ "${remotereponame}" == "GitHub" ]; then - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) else - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) fi if [ "${tmp_script_diff}" != "" ]; then @@ -130,9 +131,9 @@ fi echo -en "checking ${remotereponame} config [ ${italic}_default.cfg${default} ]\c" fn_script_log_info "Checking ${remotereponame} config _default.cfg" if [ "${remotereponame}" == "GitHub" ]; then - curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null else - curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null fi exitcode=$? if [ "${exitcode}" -ne 0 ]; then @@ -143,9 +144,9 @@ if [ "${exitcode}" -ne 0 ]; then fi if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) else - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) fi if [ "${config_file_diff}" != "" ]; then @@ -165,9 +166,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then echo -en "checking ${remotereponame} config [ ${italic}${distroid}-${distroversioncsv}.csv${default} ]\c" fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" if [ "${remotereponame}" == "GitHub" ]; then - curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null else - curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null fi exitcode=$? if [ "${exitcode}" -ne 0 ]; then @@ -178,9 +179,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fi if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) else - config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) fi if [ "${config_file_diff}" != "" ]; then @@ -204,9 +205,9 @@ if [ -n "${modulesdir}" ]; then echo -en "checking ${remotereponame} module [ ${italic}${modulefile}${default} ]\c" github_file_url_dir="lgsm/modules" if [ "${remotereponame}" == "GitHub" ]; then - curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null else - curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + curl "${nocache[@]}" --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null fi exitcode=$? if [ "${exitcode}" -ne 0 ]; then @@ -224,9 +225,9 @@ if [ -n "${modulesdir}" ]; then else # compare file if [ "${remotereponame}" == "GitHub" ]; then - module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) else - module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl "${nocache[@]}" --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) fi # results diff --git a/lgsm/modules/command_validate.sh b/lgsm/modules/command_validate.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/command_wipe.sh b/lgsm/modules/command_wipe.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/compress_unreal_maps.sh b/lgsm/modules/compress_unreal_maps.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh old mode 100644 new mode 100755 index 3b9ec99453..0a0dacb292 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -46,6 +46,18 @@ fn_dl_steamcmd() { validate="validate" fi + # steamcmdcommand can contain multiple arguments; treat it as an argv array. + steamcmdcommandarray=() + read -r -a steamcmdcommandarray <<< "${steamcmdcommand}" + unbuffercommand=() + if [ -n "${unbuffer}" ]; then + unbuffercommand=("${unbuffer}") + fi + validateparam=() + if [ -n "${validate}" ]; then + validateparam=("${validate}") + fi + # To do error checking for SteamCMD the output of steamcmd will be saved to a log. steamcmdlog="${lgsmlogdir}/${selfname}-steamcmd.log" @@ -61,29 +73,29 @@ fn_dl_steamcmd() { if [ "${appid}" == "90" ]; then # If using a specific branch. if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # All other servers. else if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi fi @@ -132,9 +144,9 @@ fn_dl_steamcmd() { fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Corrupt update files" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Corrupt update files" else - fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occurred" fn_print_nl "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" - fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occurred" fi elif [ "${exitcode}" -ne 0 ]; then fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" @@ -188,8 +200,8 @@ fn_dl_hash() { hashbin="sha512sum" hashtype="SHA512" else - fn_script_log_error "hash lengh not known for hash type" - fn_print_error_nl "hash lengh not known for hash type" + fn_script_log_error "hash length not known for hash type" + fn_print_error_nl "hash length not known for hash type" core_exit.sh fi echo -en "verifying ${local_filename} with ${hashtype}..." diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh old mode 100644 new mode 100755 index 1d5bc430c8..55c2172d46 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Code for backwards compatability with older versions of LinuxGSM. +# Description: Code for backwards compatibility with older versions of LinuxGSM. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/core_logs.sh b/lgsm/modules/core_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh old mode 100644 new mode 100755 index 37c2e98b5d..da5fd43e37 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -560,7 +560,7 @@ fn_print_restart_warning() { } # Functions below are used to ensure that logs and UI correctly reflect the command it is actually running. -# Useful when a command has to call upon another command causing the other command to overrite commandname variables +# Useful when a command has to call upon another command causing the other command to overwrite commandname variables # Used to remember the command that ran first. fn_firstcommand_set() { diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh old mode 100644 new mode 100755 index 614f5d019e..2cc635888e --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -14,31 +14,13 @@ modulesversion="v25.2.0" core_dl.sh() { modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" else fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fi } -core_messages.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_legacy.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - core_exit.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -54,17 +36,35 @@ core_getopt.sh() { fn_fetch_module } -core_trap.sh() { +core_github.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } +core_legacy.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_messages.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + core_steamcmd.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -core_github.sh() { +core_trap.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -91,87 +91,87 @@ command_details.sh() { fn_fetch_module } -command_sponsor.sh() { +command_fastdl.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_postdetails.sh() { +command_install.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_test_alert.sh() { +command_install_resources_mta.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_monitor.sh() { +command_mods_install.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_start.sh() { +command_mods_remove.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_stop.sh() { +command_mods_update.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_validate.sh() { +command_monitor.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_install.sh() { +command_postdetails.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_install_resources_mta.sh() { +command_restart.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -install_squad_license.sh() { +command_send.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_mods_install.sh() { +command_skeleton.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_mods_update.sh() { +command_sponsor.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_mods_remove.sh() { +command_start.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_fastdl.sh() { +command_stop.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_ts3_server_pass.sh() { +command_test_alert.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_restart.sh() { +command_ts3_server_pass.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_skeleton.sh() { +command_validate.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -181,7 +181,7 @@ command_wipe.sh() { fn_fetch_module } -command_send.sh() { +install_squad_license.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -277,12 +277,12 @@ compress_unreal2_maps.sh() { # Mods -mods_list.sh() { +mods_core.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -mods_core.sh() { +mods_list.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -299,37 +299,37 @@ command_dev_debug.sh() { fn_fetch_module } -command_dev_parse_game_details.sh() { +command_dev_detect_deps.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_parse_distro_details.sh() { +command_dev_detect_glibc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_detect_deps.sh() { +command_dev_detect_ldd.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_detect_glibc.sh() { +command_dev_parse_distro_details.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_detect_ldd.sh() { +command_dev_parse_game_details.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_ui.sh() { +command_dev_query_raw.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_dev_query_raw.sh() { +command_dev_ui.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -346,27 +346,27 @@ fix_ark.sh() { fn_fetch_module } -fix_av.sh() { +fix_arma3.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_arma3.sh() { +fix_armar.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_armar.sh() { +fix_av.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_bt.sh() { +fix_bo.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_bo.sh() { +fix_bt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -446,67 +446,62 @@ fix_rw.sh() { fn_fetch_module } -fix_sfc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sm.sh() { +fix_samp.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_st.sh() { +fix_sfc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_steamcmd.sh() { +fix_sm.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_terraria.sh() { +fix_sof2.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_tf2.sh() { +fix_squad.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_ut3.sh() { +fix_st.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_rust.sh() { +fix_steamcmd.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_samp.sh() { +fix_terraria.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_sdtd.sh() { +fix_tf2.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_sof2.sh() { +fix_ts3.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_squad.sh() { +fix_unt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fix_ts3.sh() { +fix_ut.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -516,12 +511,7 @@ fix_ut2k4.sh() { fn_fetch_module } -fix_ut.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_unt.sh() { +fix_ut3.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -585,27 +575,27 @@ alert_email.sh() { fn_fetch_module } -alert_ifttt.sh() { +alert_gotify.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -alert_pushbullet.sh() { +alert_ifttt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -alert_pushover.sh() { +alert_ntfy.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -alert_gotify.sh() { +alert_pushbullet.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -alert_telegram.sh() { +alert_pushover.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -620,10 +610,11 @@ alert_slack.sh() { fn_fetch_module } -alert_ntfy.sh() { +alert_telegram.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } + # Logs core_logs.sh() { @@ -639,58 +630,57 @@ query_gamedig.sh() { } # Update - -command_update_modules.sh() { +command_check_update.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_update_linuxgsm.sh() { +command_update.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_update.sh() { +command_update_linuxgsm.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -command_check_update.sh() { +command_update_modules.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_ts3.sh() { +fn_update_modules.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_mc.sh() { +update_fctr.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_mcb.sh() { +update_jk2.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_pmc.sh() { +update_mc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_mta.sh() { +update_mcb.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_fctr.sh() { +update_mta.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_jk2.sh() { +update_pmc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -700,7 +690,7 @@ update_steamcmd.sh() { fn_fetch_module } -update_vints.sh() { +update_ts3.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -710,12 +700,12 @@ update_ut99.sh() { fn_fetch_module } -update_xnt.sh() { +update_vints.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -fn_update_modules.sh() { +update_xnt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -723,6 +713,10 @@ fn_update_modules.sh() { # ## Installer modules # +check_gamedig.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} fn_autoinstall() { autoinstall=1 @@ -739,32 +733,32 @@ install_config.sh() { fn_fetch_module } -install_factorio_save.sh() { +install_dl_ut2k4.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -check_gamedig.sh() { +install_dst_token.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -install_dst_token.sh() { +install_eula.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -install_eula.sh() { +install_factorio_save.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -install_gsquery.sh() { +install_gslt.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -install_gslt.sh() { +install_gsquery.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -788,6 +782,7 @@ install_server_dir.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } + install_server_files.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -818,11 +813,6 @@ install_ut2k4.sh() { fn_fetch_module } -install_dl_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - install_ut2k4_key.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh old mode 100644 new mode 100755 index bf97901328..d265f577d1 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -185,12 +185,12 @@ fn_update_steamcmd_remotebuild() { fi # password for branch not needed to check the buildid - remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -200,7 +200,7 @@ fn_update_steamcmd_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -211,14 +211,14 @@ fn_update_steamcmd_remotebuild() { fn_update_steamcmd_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" fn_print "\n" fn_print_nl "${bold}${underline}Update${default} available" fn_print_nl "* Local build: ${red}${localbuild}${default}" - fn_print_nl "* Remote build: ${green}${remotebuildversion}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then fn_print_nl "* Branch: ${branch}" fi @@ -229,16 +229,17 @@ fn_update_steamcmd_compare() { fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -n "${betapassword}" ]; then fn_script_log_info "Branch password: ${betapassword}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -257,7 +258,6 @@ fn_update_steamcmd_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir:?}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" @@ -268,7 +268,7 @@ fn_update_steamcmd_compare() { fn_print "\n" fn_print_nl "${bold}${underline}No update${default} available" fn_print_nl "* Local build: ${green}${localbuild}${default}" - fn_print_nl "* Remote build: ${green}${remotebuildversion}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then fn_print_nl "* Branch: ${branch}" fi @@ -279,7 +279,7 @@ fn_update_steamcmd_compare() { fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi diff --git a/lgsm/modules/core_trap.sh b/lgsm/modules/core_trap.sh old mode 100644 new mode 100755 index 4b66b3937d..f9ff17ff16 --- a/lgsm/modules/core_trap.sh +++ b/lgsm/modules/core_trap.sh @@ -8,10 +8,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_trap() { + local saved_exit_status=$? + echo -e "" if [ -z "${exitcode}" ]; then - exitcode=$? + exitcode=${saved_exit_status} fi - echo -e "" + if [ -z "${exitcode}" ]; then exitcode=0 fi diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ark.sh b/lgsm/modules/fix_ark.sh old mode 100644 new mode 100755 index 366d137dd0..3d6913d00b --- a/lgsm/modules/fix_ark.sh +++ b/lgsm/modules/fix_ark.sh @@ -7,7 +7,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# removes mulitple appworkshop_346110.acf if found. +# removes multiple appworkshop_346110.acf if found. steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)" if [ "${steamappsfilewc}" -gt "1" ]; then fixname="multiple appworkshop acf files" @@ -15,7 +15,7 @@ if [ "${steamappsfilewc}" -gt "1" ]; then find "${HOME}" -name appworkshop_346110.acf -exec rm -f {} \; fn_fix_msg_end elif [ "${steamappsfilewc}" -eq "1" ]; then - # Steam mods directory selecter + # Steam mods directory selector # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf) steamappsdir=$(dirname "${steamappsfile}") diff --git a/lgsm/modules/fix_arma3.sh b/lgsm/modules/fix_arma3.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_av.sh b/lgsm/modules/fix_av.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_bo.sh b/lgsm/modules/fix_bo.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_cmw.sh b/lgsm/modules/fix_cmw.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_csgo.sh b/lgsm/modules/fix_csgo.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_dst.sh b/lgsm/modules/fix_dst.sh old mode 100644 new mode 100755 index 2848fa5bb8..e4fcc5a1cc --- a/lgsm/modules/fix_dst.sh +++ b/lgsm/modules/fix_dst.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). -# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. +# Issue only occurs on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then fixname="libcurl-gnutls.so.4" fn_fix_msg_start diff --git a/lgsm/modules/fix_hw.sh b/lgsm/modules/fix_hw.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ins.sh b/lgsm/modules/fix_ins.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_mcb.sh b/lgsm/modules/fix_mcb.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_mta.sh b/lgsm/modules/fix_mta.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_onset.sh b/lgsm/modules/fix_onset.sh old mode 100644 new mode 100755 index 6430e5d6b7..eeb18f0e29 --- a/lgsm/modules/fix_onset.sh +++ b/lgsm/modules/fix_onset.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" # Fixes: Failed loading "mariadb": libmariadbclient.so.18: cannot open shared object file: No such file or directory -# Issue only occures on CentOS as libmariadbclient.so.18 is called libmariadb.so.3 on CentOS. +# Issue only occurs on CentOS as libmariadbclient.so.18 is called libmariadb.so.3 on CentOS. if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/libmariadbclient.so.18" ] && [ -f "/usr/lib64/libmariadb.so.3" ]; then fixname="libmariadbclient.so.18" fn_fix_msg_start diff --git a/lgsm/modules/fix_pvr.sh b/lgsm/modules/fix_pvr.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_rust.sh b/lgsm/modules/fix_rust.sh old mode 100644 new mode 100755 index 80c790a590..167a5183d9 --- a/lgsm/modules/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -23,7 +23,7 @@ if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then randomseed=1 fi -# If Carbon mod is installed, run enviroment.sh +# If Carbon mod is installed, run environment.sh if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then fn_print_info_nl "Running Carbon environment.sh" fn_script_log_info "Running Carbon environment.sh" diff --git a/lgsm/modules/fix_rw.sh b/lgsm/modules/fix_rw.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_sdtd.sh b/lgsm/modules/fix_sdtd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_sfc.sh b/lgsm/modules/fix_sfc.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_sm.sh b/lgsm/modules/fix_sm.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_sof2.sh b/lgsm/modules/fix_sof2.sh old mode 100644 new mode 100755 index 45e3b299c5..3eb95bc9f3 --- a/lgsm/modules/fix_sof2.sh +++ b/lgsm/modules/fix_sof2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_sof2.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/fix_squad.sh b/lgsm/modules/fix_squad.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh old mode 100644 new mode 100755 index bbd9890bdb..598d971b0d --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_ts.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_terraria.sh b/lgsm/modules/fix_terraria.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_tf2.sh b/lgsm/modules/fix_tf2.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_unt.sh b/lgsm/modules/fix_unt.sh old mode 100644 new mode 100755 index dbe64ffd6f..f32737285f --- a/lgsm/modules/fix_unt.sh +++ b/lgsm/modules/fix_unt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_unt.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/fix_ut.sh b/lgsm/modules/fix_ut.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh old mode 100644 new mode 100755 index 7c14554432..c6564eb199 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_vh.sh module # Author: Alasdair Haig # Website: https://linuxgsm.com # Description: Resolves issues with Valheim. @@ -21,8 +21,8 @@ if [ -f "${modsinstalledlistfullpath}" ]; then rm -rf "${serverfiles}/unstripped_corlib" fi sed -i "s/^dllSearchPathOverride=unstripped_corlib/# &/" "${serverfiles}/doorstop_config.ini" - sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/" "${serverfiles}/start_game_bepinex.sh" - sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/" "${serverfiles}/start_server_bepinex.sh" + sed -i "s|^export DOORSTOP_CORLIB_OVERRIDE_PATH=\"\\\$BASEDIR/unstripped_corlib\"|# &|" "${serverfiles}/start_game_bepinex.sh" + sed -i "s|^export DOORSTOP_CORLIB_OVERRIDE_PATH=\"\\\${VALHEIM_PLUS_PATH}/unstripped_corlib\"|# &|" "${serverfiles}/start_server_bepinex.sh" fi # special exports for BepInEx if installed if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then diff --git a/lgsm/modules/fix_wurm.sh b/lgsm/modules/fix_wurm.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/fix_zmr.sh b/lgsm/modules/fix_zmr.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh old mode 100644 new mode 100755 index a986edf1f3..1d74ac6353 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Variables providing useful info on the Operating System such as disk and performace info. +# Description: Variables providing useful info on the Operating System such as disk and performance info. # Used for command_details.sh, command_debug.sh and alert.sh. # !Note: When adding variables to this script, ensure that they are also added to the command_dev_parse_distro_details.sh script. @@ -13,9 +13,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${status}" == "1" ]; then gameserverpid="$(tmux -L "${socketname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" if [ "${engine}" == "source" ]; then - srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" + srcdslinuxpid="$(pgrep -P "${gameserverpid}" -x srcds_linux 2> /dev/null | head -n 1)" elif [ "${engine}" == "goldsrc" ]; then - hldslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}')" + hldslinuxpid="$(pgrep -P "${gameserverpid}" -x hlds_linux 2> /dev/null | head -n 1)" fi fi ### Distro information @@ -252,11 +252,11 @@ if [ -d "${backupdir}" ]; then backupcount=0 # If there are backups in backup dir. - if [ "$(find "${backupdir}" -name "*.tar.*" | wc -l)" -ne "0" ]; then + if [ "$(find "${backupdir}" -maxdepth 1 -type f -name "*.tar.*" | wc -l)" -ne "0" ]; then # number of backups. - backupcount="$(find "${backupdir}"/*.tar.* | wc -l)" # integer + backupcount="$(find "${backupdir}" -maxdepth 1 -type f -name "*.tar.*" | wc -l)" # integer # most recent backup. - lastbackup="$(ls -1t "${backupdir}"/*.tar.* | head -1)" # string + lastbackup="$(find "${backupdir}" -maxdepth 1 -type f -name "*.tar.*" -printf '%T@ %p\n' 2> /dev/null | sort -nr | head -n 1 | cut -d' ' -f2-)" # string # date of most recent backup. lastbackupdate="$(date -r "${lastbackup}")" # string # no of days since last backup. @@ -272,7 +272,7 @@ netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then - if [ "${glibc}" = "null" ] || [ -z "${glibc}" ] || [ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then + if [ "${glibc}" = "null" ] || [ -z "${glibc}" ] || [ "$(printf '%s\n' "${glibc}" "2.14" | sort -V | head -n 1)" != "2.14" ]; then glibc="2.14" fi fi diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh old mode 100644 new mode 100755 index 0b43ba6261..d39e2d143d --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -350,7 +350,7 @@ fn_info_game_av() { rconenabled="${rconenabled:-"false"}" rconpassword="${rconpassword:-"NOT SET"}" rconport="${rconport:-"0"}" - # queryport doesnt respond to any queries, using session only. + # queryport doesn't respond to any queries, using session only. queryport=""$((port + 3))"" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" @@ -2514,7 +2514,7 @@ if [ ! -f "${tmpdir}/publicip.json" ] || [ "$(find "${tmpdir}/publicip.json" -mm ipresponse=$(curl -s --max-time 3 "${apiurl}") # Attempt to query ip-api.com with a 3 second timeout exitcode=$? - # Check if the first request was successfull + # Check if the first request was successful if [ "${exitcode}" -eq 0 ]; then fn_script_log_pass "Queried ${apiurl} for public IP address" @@ -2532,7 +2532,7 @@ if [ ! -f "${tmpdir}/publicip.json" ] || [ "$(find "${tmpdir}/publicip.json" -mm ipresponse=$(curl -s --max-time 3 "${apiurl}") # Attempt to query myip.wtf with a 3 second timeout as a backup exitcode=$? - # Check if the backup request was successfull + # Check if the backup request was successful if [ "${exitcode}" -eq 0 ]; then fn_script_log_pass "Queried ${apiurl} for public IP address" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh old mode 100644 new mode 100755 index 242c6b3372..1ef9508303 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -369,7 +369,7 @@ fn_info_messages_gameserver() { fi fi - # Reverved Slots + # Reserved Slots if [ -n "${statspassword}" ]; then echo -e "${lightblue}Reserved Slots:\t${default}${reservedslots}" fi @@ -578,7 +578,7 @@ fn_info_messages_script() { : elif [ -z "${glibc}" ]; then echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}" - elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then + elif [ "$(printf '%s\n' "${glibc}" "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})" else echo -e "${lightblue}glibc required:\t${green}${glibc}${default}" @@ -598,7 +598,7 @@ fn_info_messages_script() { echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" fi # IFTTT alert - if [ "${iftttalert}" == "on" ]; then + if [ "${iftttalert}" == "on" ]; then echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" fi # Pushbullet alert diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh old mode 100644 new mode 100755 index b73e7b4b26..41d4ad866a --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -16,7 +16,7 @@ fn_check_cfgdir() { fi } -# Copys default configs from Game-Server-Configs repo to server config location. +# Copies default configs from Game-Server-Configs repo to server config location. fn_default_config_remote() { echo -e "" echo -e "${bold}${lightyellow}Downloading ${gamename} Configs${default}" @@ -88,7 +88,7 @@ fn_default_config_remote() { done } -# Copys local default config to server config location. +# Copies local default config to server config location. fn_default_config_local() { echo -e "" echo -e "${bold}${lightyellow}Copying ${gamename} Configs${default}" diff --git a/lgsm/modules/install_dst_token.sh b/lgsm/modules/install_dst_token.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_eula.sh b/lgsm/modules/install_eula.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_factorio_save.sh b/lgsm/modules/install_factorio_save.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_gslt.sh b/lgsm/modules/install_gslt.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_header.sh b/lgsm/modules/install_header.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_mta_resources.sh b/lgsm/modules/install_mta_resources.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_retry.sh b/lgsm/modules/install_retry.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_stats.sh b/lgsm/modules/install_stats.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_steamcmd.sh b/lgsm/modules/install_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh old mode 100644 new mode 100755 index 963a52f10c..4c62422d0b --- a/lgsm/modules/install_ut2k4_key.sh +++ b/lgsm/modules/install_ut2k4_key.sh @@ -18,7 +18,7 @@ if [ -z "${autoinstall}" ]; then echo -e "Once you have the key enter it below" echo -n "KEY: " read -r CODE - echo -e ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" + printf '"CDKey"="%s"\n' "${CODE}" > "${systemdir}/cdkey" if [ -f "${systemdir}/cdkey" ]; then fn_script_log_info "UT2K4 Server CD Key created" fi diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh old mode 100644 new mode 100755 index b88e0c05eb..bed0f9f49e --- a/lgsm/modules/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -197,14 +197,15 @@ fn_mod_get_info() { # Variable to know when job is done. modinfocommand="0" # Find entry in global array. - for ((index = 0; index <= ${#mods_global_array[@]}; index++)); do + for ((index = 0; index < ${#mods_global_array[@]}; index++)); do # When entry is found. if [ "${mods_global_array[index]}" == "${currentmod}" ]; then # Go back to the previous "MOD" separator. - for ((index = index; index <= ${#mods_global_array[@]}; index--)); do + for ((index_search = index; index_search >= 0; index_search--)); do # When "MOD" is found. - if [ "${mods_global_array[index]}" == "MOD" ]; then + if [ "${mods_global_array[index_search]}" == "MOD" ]; then # Get info. + index=${index_search} fn_mods_define modinfocommand="1" break @@ -249,7 +250,7 @@ fn_mods_define() { } # Builds list of installed mods. -# using installed-mods.txt grabing mod info from mods_list.sh. +# using installed-mods.txt grabbing mod info from mods_list.sh. fn_mods_installed_list() { fn_mods_count_installed # Set/reset variables. @@ -331,7 +332,7 @@ fn_compatible_mod_engines() { # How many engines we need to test. enginesamount=$(echo -e "${modengines}" | awk -F ';' '{ print NF }') # Test all subvalue of "modengines" using the ";" separator. - for ((gamevarindex = 1; gamevarindex < ${enginesamount}; gamevarindex++)); do + for ((gamevarindex = 1; gamevarindex < enginesamount; gamevarindex++)); do # Put current engine name into modtest variable. enginemodtest=$(echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') # If engine name matches. @@ -472,7 +473,7 @@ fn_mods_check_installed() { # Count installed mods. fn_mods_count_installed # If no mods are found. - if [ ${installedmodscount} -eq 0 ]; then + if [ "${installedmodscount}" -eq 0 ]; then echo -e "" fn_print_failure_nl "No installed mods or addons were found" echo -e " * Install mods using LinuxGSM first with: ./${selfname} mods-install" @@ -566,7 +567,7 @@ fn_mod_liblist_gam_filenames() { esac } -# modifers for liblist.gam to add/remote metamod binaries +# modifiers for liblist.gam to add/remote metamod binaries fn_mod_install_liblist_gam_file() { fn_mod_liblist_gam_filenames @@ -689,13 +690,9 @@ fn_mod_install_amxmodx_file() { # since it does exist, is the entry already in plugins.ini logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) inserted into ${modinstalldir}/addons/metamod/plugins.ini" echo -en "adding amxmodx_mm_i386.so in plugins.ini..." - grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" -ne 0 ]; then + if ! grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini"; then # file exists but the entry does not, let's add it - echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" -ne 0 ]; then + if ! echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini"; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else @@ -705,9 +702,7 @@ fn_mod_install_amxmodx_file() { fi else # create new file and add the mod to it - echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" -ne 0 ]; then + if ! echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini"; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl core_exit.sh @@ -723,10 +718,8 @@ fn_mod_remove_amxmodx_file() { # since it does exist, is the entry already in plugins.ini logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini" echo -en "removing amxmodx_mm_i386.so in plugins.ini..." - grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" - # iIs it found? If so remove it and clean up - exitcode=$? - if [ "${exitcode}" -eq 0 ]; then + # is it found? If so remove it and clean up + if grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini"; then # delete the line we inserted sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' "${modinstalldir}/addons/metamod/plugins.ini" # remove empty lines diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh old mode 100644 new mode 100755 index bbefc5ea26..b3f9877f19 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -129,7 +129,7 @@ modseparator="MOD" # [9] | "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value # [10] | "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value # [11] | "Unsupported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use NOTGAMES to ignore the value (useful to exclude a game when using Supported Engines) -# [12] | "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install +# [12] | "AUTHOR_URL" is the author's website, displayed to the user when choosing mods to install # [13] | "Short Description" a description showed to the user upon installation/removal # Half-life 1 Engine Mods @@ -172,7 +172,7 @@ mod_info_ulib=(MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/z mod_info_ulx=(MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)") mod_info_utime=(MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time") mod_info_uclip=(MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip") -mod_info_acf=(MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines") +mod_info_acf=(MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Weapons & Engines") mod_info_acf_missiles=(MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF") mod_info_advdupe2=(MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version") mod_info_pac3=(MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization") @@ -191,7 +191,7 @@ mod_info_magneticdipole=(MOD "magneticdipole" "Magnetic Dipole" "https://github. mod_info_environmentorganizer=(MOD "environmentorganizer" "Environment Organizer" "https://github.com/dvdvideo1234/environmentorganizer/archive/master.zip" "environmentorganizer-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/EnvironmentOrganizer" "Installs routines designed for server settings adjustment") mod_info_improved_stacker=(MOD "improved-stacker" "Improved Stacker" "https://github.com/Mista-Tea/improved-stacker/archive/master.zip" "improved-stacker-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-stacker" "Stacks entities in the direction chosen") mod_info_improved_weight=(MOD "improved-weight" "Improved Weight" "https://github.com/Mista-Tea/improved-weight/archive/master.zip" "improved-weight-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-weight" "Weight tool but with more features") -mod_info_improved_antinoclip=(MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping trough an object") +mod_info_improved_antinoclip=(MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping through an object") mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode") mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings") mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players") diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh old mode 100644 new mode 100755 index d8c3c6a7fd..1fa74a823e --- a/lgsm/modules/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Querys a gameserver using node-gamedig. +# Description: Queries a gameserver using node-gamedig. # https://github.com/gamedig/node-gamedig moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 4dbde90dd8..c4b8c3ddcf 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -6,154 +6,206 @@ # Website: https://linuxgsm.com # Description: Allows querying of various game servers. +"""Query game servers using a set of lightweight UDP protocols.""" + import argparse import socket import sys -engine_types = ('protocol-valve', 'protocol-quake2', 'protocol-quake3', 'protocol-gamespy1', - 'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2m', 'mumbleping', 'soldat', 'teeworlds') +engine_types = ( + "protocol-valve", + "protocol-quake2", + "protocol-quake3", + "protocol-gamespy1", + "protocol-unreal2", + "ut3", + "minecraft", + "minecraftbe", + "jc2m", + "mumbleping", + "soldat", + "teeworlds", +) + +class GSQuery: + """Game server query dispatcher.""" -class gsquery: server_response_timeout = 2 default_buffer_length = 1024 - sourcequery = ('protocol-valve', 'avalanche3.0', 'barotrauma', 'madness', 'quakelive', 'realvirtuality', - 'refractor', 'source', 'goldsrc', 'spark', 'starbound', 'unity3d', 'unreal4', 'wurm') - idtech2query = ('protocol-quake2', 'idtech2', 'quake', 'iw2.0') - idtech3query = ('protocol-quake3', 'iw3.0', 'ioquake3', 'qfusion') - minecraftquery = ('minecraft', 'lwjgl2') - minecraftbequery = ('minecraftbe') - jc2mquery = ('jc2m') - mumblequery = ('mumbleping') - soldatquery = ('soldat') - twquery = ('teeworlds') - unrealquery = ('protocol-gamespy1', 'unreal') - unreal2query = ('protocol-unreal2', 'unreal2') - unreal3query = ('ut3', 'unreal3') + sourcequery = ( + "protocol-valve", + "avalanche3.0", + "barotrauma", + "madness", + "quakelive", + "realvirtuality", + "refractor", + "source", + "goldsrc", + "spark", + "starbound", + "unity3d", + "unreal4", + "wurm", + ) + idtech2query = ("protocol-quake2", "idtech2", "quake", "iw2.0") + idtech3query = ("protocol-quake3", "iw3.0", "ioquake3", "qfusion") + minecraftquery = ("minecraft", "lwjgl2") + minecraftbequery = ("minecraftbe",) + jc2mquery = ("jc2m",) + mumblequery = ("mumbleping",) + soldatquery = ("soldat",) + twquery = ("teeworlds",) + unrealquery = ("protocol-gamespy1", "unreal") + unreal2query = ("protocol-unreal2", "unreal2") + unreal3query = ("ut3", "unreal3") def __init__(self, arguments): + """Create a query instance from parsed CLI args.""" + self.argument = arguments # if self.argument.engine in self.sourcequery: - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b"\xff\xff\xff\xffTSource Engine Query\0" elif self.argument.engine in self.idtech2query: - self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' + self.query_prompt_string = b"\xff\xff\xff\xffstatus\x00" elif self.argument.engine in self.idtech3query: - self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' + self.query_prompt_string = b"\xff\xff\xff\xffgetstatus" elif self.argument.engine in self.jc2mquery: - self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' + self.query_prompt_string = b"\xfe\xfd\x09\x10\x20\x30\x40" elif self.argument.engine in self.minecraftquery: - self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93' + self.query_prompt_string = b"\xfe\xfd\x09\x3d\x54\x1f\x93" elif self.argument.engine in self.minecraftbequery: - self.query_prompt_string = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78\x00\x00\x00\x00\x00\x00\x00\x00' + self.query_prompt_string = ( + b"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00" + b"\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78" + b"\x00\x00\x00\x00\x00\x00\x00\x00" + ) elif self.argument.engine in self.mumblequery: - self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08' + self.query_prompt_string = ( + b"\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08" + ) elif self.argument.engine in self.soldatquery: - self.query_prompt_string = b'\x69\x00' + self.query_prompt_string = b"\x69\x00" elif self.argument.engine in self.twquery: - self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + \ - bytearray(511) + self.query_prompt_string = b"\x04\x00\x00\xff\xff\xff\xff\x05" + bytearray( + 511 + ) elif self.argument.engine in self.unrealquery: - self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' + self.query_prompt_string = b"\x5c\x69\x6e\x66\x6f\x5c" elif self.argument.engine in self.unreal2query: - self.query_prompt_string = b'\x79\x00\x00\x00\x00' + self.query_prompt_string = b"\x79\x00\x00\x00\x00" elif self.argument.engine in self.unreal3query: - self.query_prompt_string = b'\xFE\xFD\x09\x00\x00\x00\x00' + self.query_prompt_string = b"\xfe\xfd\x09\x00\x00\x00\x00" self.connected = False self.response = None @staticmethod def fatal_error(error_message, error_code=1): - sys.stderr.write('ERROR: ' + str(error_message) + '\n') + """Write an error message to stderr and exit.""" + + sys.stderr.write("ERROR: " + str(error_message) + "\n") sys.exit(error_code) @staticmethod - def exit_success(success_message=''): - sys.stdout.write('OK: ' + str(success_message) + '\n') + def exit_success(success_message=""): + """Write a success message to stdout and exit.""" + + sys.stdout.write("OK: " + str(success_message) + "\n") sys.exit(0) def responding(self): + """Send a single UDP query and print the response.""" + # Connect. connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) connection.settimeout(self.server_response_timeout) try: self.connected = connection.connect( - (self.argument.address, int(self.argument.port))) + (self.argument.address, int(self.argument.port)) + ) except socket.timeout: - self.fatal_error('Request timed out', 1) - except Exception: - self.fatal_error('Unable to connect', 1) + self.fatal_error("Request timed out", 1) + except OSError: + self.fatal_error("Unable to connect", 1) # Send. connection.send(self.query_prompt_string) # Receive. try: self.response = connection.recv(self.default_buffer_length) except socket.error: - self.fatal_error('Unable to receive', 2) + self.fatal_error("Unable to receive", 2) connection.close() # Response. if self.response is None: - self.fatal_error('No response', 3) + self.fatal_error("No response", 3) if len(self.response) < 5: - sys.exit('Short response.', 3) + sys.exit("Short response.", 3) else: self.exit_success(str(self.response)) def parse_args(): + """Parse command-line arguments.""" + parser = argparse.ArgumentParser( - description='Allows querying of various game servers.', - usage='usage: python3 %(prog)s [options]', - add_help=False + description="Allows querying of various game servers.", + usage="usage: python3 %(prog)s [options]", + add_help=False, ) parser.add_argument( - '-a', '--address', + "-a", + "--address", type=str, required=True, - help='The IPv4 address of the server.' + help="The IPv4 address of the server.", ) parser.add_argument( - '-p', '--port', + "-p", + "--port", type=int, required=True, - help='The IPv4 port of the server.' + help="The IPv4 port of the server.", ) parser.add_argument( - '-e', '--engine', - metavar='ENGINE', + "-e", + "--engine", + metavar="ENGINE", choices=engine_types, - help='Engine type: ' + ' '.join(engine_types) + help="Engine type: " + " ".join(engine_types), ) parser.add_argument( - '-v', '--verbose', - action='store_true', - help='Display verbose output.' + "-v", + "--verbose", + action="store_true", + help="Display verbose output.", ) parser.add_argument( - '-d', '--debug', - action='store_true', - help='Display debugging output.' + "-d", + "--debug", + action="store_true", + help="Display debugging output.", ) parser.add_argument( - '-V', '--version', - action='version', - version='%(prog)s 0.0.1', - help='Display version and exit.' - ) - parser.add_argument( - '-h', '--help', - action='help', - help='Display help and exit.' + "-V", + "--version", + action="version", + version="%(prog)s 0.0.1", + help="Display version and exit.", ) + parser.add_argument("-h", "--help", action="help", help="Display help and exit.") return parser.parse_args() def main(): + """CLI entrypoint.""" + arguments = parse_args() - server = gsquery(arguments) + server = GSQuery(arguments) server.responding() -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh old mode 100644 new mode 100755 index 3418c74247..5de789cdb1 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -10,25 +10,32 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" + fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${serverfiles}" "factorio" fn_clear_tmp } fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" + # Optional arg1: 'silent' to suppress user-facing output + local mode="${1:-}" + if [ "${mode}" != "silent" ]; then + fn_print_dots "Checking local build: ${remotelocation}" + fi # Uses executable to get local build. if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild=$(${executable} --version | grep -m 1 "Version:" | awk '{print $2}') fi if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" + if [ "${mode}" != "silent" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fi fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" localbuild="0" else - fn_print_ok "Checking local build: ${remotelocation}" + if [ "${mode}" != "silent" ]; then + fn_print_ok "Checking local build: ${remotelocation}" + fi fn_script_log_pass "Checking local build" fi } @@ -37,14 +44,14 @@ fn_update_remotebuild() { # Gets remote build info. apiurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" remotebuildresponse=$(curl -s "${apiurl}") - remotebuildversion=$(echo "${remotebuildresponse}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) + remotebuild=$(echo "${remotebuildresponse}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) remotebuildurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" - remotebuildfilename="factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" + remotebuildfilename="factorio_headless_${factorioarch}-${remotebuild}.tar.xz" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -54,7 +61,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -65,35 +72,37 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + # Keep track of the build before updating for alert purposes. + previousbuild="${localbuild}" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -120,6 +129,23 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset fi + # Refresh local build value after update (silent) so alerts show new version. + fn_update_localbuild silent + # Verify the update applied correctly unless forced update to same version. + if [ "${localbuild}" != "${remotebuild}" ]; then + # If forced update and version unchanged treat as acceptable; otherwise failure. + if [ "${forceupdate}" != "1" ] || [ "${previousbuild}" = "${localbuild}" ]; then + fn_script_log_error "Update verification failed: expected ${remotebuild}, got ${localbuild}" + fn_print_fail_nl "Update verification failed: expected ${remotebuild}, got ${localbuild}" + updatefailureexpected="${remotebuild}" + updatefailuregot="${localbuild}" + alert="update-failed" + alert.sh + core_exit.sh + fi + else + fn_script_log_pass "Update verification success: ${previousbuild} -> ${localbuild}" + fi unset exitbypass alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then @@ -128,26 +154,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } diff --git a/lgsm/modules/update_jk2.sh b/lgsm/modules/update_jk2.sh old mode 100644 new mode 100755 index 5fdd54c654..ee40988d92 --- a/lgsm/modules/update_jk2.sh +++ b/lgsm/modules/update_jk2.sh @@ -36,12 +36,12 @@ fn_update_remotebuild() { remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .name') remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.tag_name') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -51,7 +51,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -62,34 +62,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -117,7 +118,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" @@ -125,26 +125,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -152,12 +152,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="github.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh old mode 100644 new mode 100755 index a9be77576d..81540f0020 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -39,24 +39,24 @@ fn_update_remotebuild() { remotebuildresponse=$(curl -s "${apiurl}") # Latest release. if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.release') + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.latest.release') # Latest snapshot. elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot') + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot') # Specific release/snapshot. else - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') + remotebuild=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') fi - remotebuildfilename="minecraft_server.${remotebuildversion}.jar" + remotebuildfilename="minecraft_server.${remotebuild}.jar" # Generate link to version manifest json. - remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') + remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuild}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') # Generate link to server.jar remotebuildurl=$(curl -s "${remotebuildmanifest}" | jq -r '.downloads.server.url') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -66,7 +66,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -77,35 +77,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -140,26 +140,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -167,12 +167,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="mojang.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh old mode 100644 new mode 100755 index a8616c3b82..9940415a1c --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -8,12 +8,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" "nochmodx" "norun" "noforce" "nohash" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then - unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" + unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" else - unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" + unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" fi exitcode=$? if [ "${exitcode}" -ne 0 ]; then @@ -61,13 +61,13 @@ fn_update_remotebuild() { else remotebuildurl=$(echo "${remotebuildresponse}" | jq -r 'select(.downloadType == "serverBedrockLinux") | .downloadUrl') fi - remotebuildversion=$(echo "${remotebuildurl}" | grep -Eo "[.0-9]+[0-9]") - remotebuildfilename="bedrock-server-${remotebuildversion}.zip" + remotebuild=$(echo "${remotebuildurl}" | grep -Eo "[.0-9]+[0-9]") + remotebuildfilename="bedrock-server-${remotebuild}.zip" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -77,7 +77,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -88,35 +88,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -151,26 +151,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -178,12 +178,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="minecraft.net" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh old mode 100644 new mode 100755 index 50a3fb895e..b1ba0459c8 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -39,11 +39,11 @@ fn_update_remotebuild() { remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename="multitheftauto_linux_x64.tar.gz" remotebuildurl="http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" - remotebuildversion=$(echo "${remotebuildresponse}") + remotebuild="${remotebuildresponse}" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -53,7 +53,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -64,7 +64,7 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" if [ "${forceupdate}" == "1" ]; then @@ -74,30 +74,31 @@ fn_update_compare() { mtaupdatestatus="available" fi fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -125,7 +126,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" @@ -133,26 +133,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -160,12 +160,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="linux.mtasa.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh old mode 100644 new mode 100755 index c38911d4ee..e0bbfa05ae --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -11,7 +11,7 @@ fn_update_dl() { # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" - echo "${remotebuildversion}" > "${serverfiles}/build.txt" + echo "${remotebuild}" > "${serverfiles}/build.txt" fn_clear_tmp } @@ -61,12 +61,12 @@ fn_update_remotebuild() { remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256') remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}" # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456 - remotebuildversion="${remotebuildmcversion}-${remotebuildpaperversion}" + remotebuild="${remotebuildmcversion}-${remotebuildpaperversion}" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -76,7 +76,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -87,35 +87,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -150,26 +150,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -177,12 +177,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="papermc.io" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${shortname}" == "pmc" ]; then paperproject="paper" elif [ "${shortname}" == "vpmc" ]; then diff --git a/lgsm/modules/update_steamcmd.sh b/lgsm/modules/update_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh old mode 100644 new mode 100755 index e1917e5e13..ec3bc0060e --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -43,12 +43,12 @@ fn_update_remotebuild() { remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.checksum') fi remotebuildfilename=$(basename "${remotebuildurl}") - remotebuildversion=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version') + remotebuild=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -58,7 +58,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -69,35 +69,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -132,26 +132,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -171,12 +171,6 @@ fi # The location where the builds are checked and downloaded. remotelocation="teamspeak.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh old mode 100644 new mode 100755 index bdfb96f0b0..4e3f93b310 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -11,7 +11,7 @@ fn_update_dl() { # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" - echo "${remotebuildversion}" > "${serverfiles}/build.txt" + echo "${remotebuild}" > "${serverfiles}/build.txt" fn_clear_tmp } @@ -37,12 +37,12 @@ fn_update_remotebuild() { remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.tag_name') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -52,7 +52,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -63,35 +63,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -126,26 +126,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -153,12 +153,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="github.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh old mode 100644 new mode 100755 index a300b87eb9..86a7156ee0 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -20,6 +20,7 @@ fn_update_localbuild() { # Uses executable to get local build. if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit + # shellcheck disable=SC2086 # Intentional: preexecutable may be empty; unquoted to drop it without producing an empty arg. localbuild="$(${preexecutable} ${executable} --version 2> /dev/null | sed '/^[[:space:]]*$/d')" fi if [ -z "${localbuild}" ]; then @@ -44,14 +45,14 @@ fn_update_remotebuild() { else remotebuildversion="${branch}" fi - remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.filename') - remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.urls.cdn') - remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.md5') + remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename') + remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn') + remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.md5') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -61,7 +62,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -72,35 +73,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -135,26 +136,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -162,12 +163,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="vintagestory.at" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh old mode 100644 new mode 100755 index c00233aa7b..3a937a9f6a --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -54,13 +54,12 @@ fn_update_remotebuild() { remotebuildfilename=$(echo "${remotebuildtag}" | tr -d 'v') remotebuildfilename="${remotebuildfilename}.zip" remotebuildurl="https://dl.xonotic.org/${remotebuildfilename}" - - remotebuildversion="${remotebuildtag}" + remotebuild="${remotebuildtag}" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fail "Checking remote build" core_exit.sh @@ -70,7 +69,7 @@ fn_update_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fail "Unable to get remote build" core_exit.sh @@ -81,35 +80,35 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Update has been found or force update. - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" + fn_script_log_info "${localbuild} > ${remotebuild}" if [ "${commandname}" == "UPDATE" ]; then - date +%s > "${lockdir}/last-updated.lock" + date +%s > "${lockdir:?}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -144,26 +143,26 @@ fn_update_compare() { alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi - echo -en "\n" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" + fn_script_log_info "Remote build: ${remotebuild}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" fi fi } @@ -171,12 +170,6 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="github.com" -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_fail_nl "jq is not installed" - fn_script_log_fail "jq is not installed" - core_exit.sh -fi - if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/linuxgsm.sh b/linuxgsm.sh index 997bc30c8a..443e1d8bfb 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -330,7 +330,8 @@ fn_install_menu() { # Gets server info from serverlist.csv and puts in to array. fn_server_info() { IFS="," - server_info_array=($(grep -aw "${userinput}" "${serverlist}")) + server_info_line="$(grep -aw "${userinput}" "${serverlist}" | head -n 1)" + read -r -a server_info_array <<< "${server_info_line}" shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver gamename="${server_info_array[2]}" # Counter Strike: Global Offensive diff --git a/package.json b/package.json index 404356e5e5..b9a3485072 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,27 @@ { - "name": "linuxgsm", - "description": "


\"LinuxGSM\"

", - "directories": { - "test": "tests" - }, - "devDependencies": { - "prettier": "^3.4.2", - "prettier-plugin-sh": "^0.14.0" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/GameServerManagers/LinuxGSM.git" - }, - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/GameServerManagers/LinuxGSM/issues" - }, - "homepage": "https://github.com/GameServerManagers/LinuxGSM#readme", - "dependencies": { - "gamedig": "^5.1.4" - } + "name": "linuxgsm", + "description": "


\"LinuxGSM\"

", + "directories": { + "test": "tests" + }, + "devDependencies": { + "prettier": "^3.4.2", + "prettier-plugin-sh": "^0.14.0" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/GameServerManagers/LinuxGSM.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/GameServerManagers/LinuxGSM/issues" + }, + "homepage": "https://github.com/GameServerManagers/LinuxGSM#readme", + "dependencies": { + "gamedig": "^5.1.4" + } } From 82b820879266736d879a64b082988900422390a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:41:14 +0000 Subject: [PATCH 08/22] docs(license): update copyright year(s) (#4866) Co-authored-by: github-actions Co-authored-by: Daniel Gibbs --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index c8ab9fa34b..c138f40712 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2012-2025 Daniel Gibbs +Copyright (c) 2012-2026 Daniel Gibbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b930161f1dffa038c95dd002dad327f0de6bf1db Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Mar 2026 21:10:17 +0000 Subject: [PATCH 09/22] fix: re-add missing module --- lgsm/modules/core_modules.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 2cc635888e..b2bd522a8f 100755 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -451,6 +451,11 @@ fix_samp.sh() { fn_fetch_module } +fix_sdtd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fix_sfc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module From 397f26e9bac2904067a6305535c44ae4bd36b40d Mon Sep 17 00:00:00 2001 From: Anton Siuvaev Date: Sun, 19 Apr 2026 01:41:21 +0300 Subject: [PATCH 10/22] Update papermc.io API usage to new format (#4895) Co-authored-by: Anton Siuvaev --- lgsm/modules/update_pmc.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index e0bbfa05ae..9273a567ab 100755 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -32,18 +32,19 @@ fn_update_localbuild() { } fn_update_remotebuild() { + jq_versions_all='.versions | to_entries | map(.value[])' # Gets remote build info. - apiurl="https://api.papermc.io/v2/projects" + apiurl="https://fill.papermc.io/v3/projects" # Get list of projects. remotebuildresponse=$(curl -s "${apiurl}") # Get list of Minecraft versions for project. remotebuildresponseproject=$(curl -s "${apiurl}/${paperproject}") # Get latest Minecraft: Java Edition version or user specified version. if [ "${mcversion}" == "latest" ]; then - remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r '.versions[-1]') + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r "$jq_versions_all | first") else # Checks if user specified version exists. - remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" "$jq_versions_all | .[] | select(. == \$mcversion)") if [ -z "${remotebuildmcversion}" ]; then # user passed version does not exist fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" @@ -54,12 +55,12 @@ fn_update_remotebuild() { # Get list of paper builds for specific Minecraft: Java Edition version. remotebuildresponsemcversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}") # Get latest paper build for specific Minecraft: Java Edition version. - remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]') + remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[0]') # Get various info about the paper build. remotebuildresponseversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}") - remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.name') - remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256') - remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}" + remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads["server:default"].name') + remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads["server:default"].checksums.sha256') + remotebuildurl=$(echo "${remotebuildresponseversion}" | jq -r '.downloads["server:default"].url') # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456 remotebuild="${remotebuildmcversion}-${remotebuildpaperversion}" From 1c69f75727671cd6ab928df9292a31b700982193 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Apr 2026 23:42:36 +0100 Subject: [PATCH 11/22] chore: synced local '.github/' with remote 'general/.github/' (#4886) From f45456e32d687f9a43da7c87715d5ea9812db8eb Mon Sep 17 00:00:00 2001 From: Hugo Maurin <148004075+Huguiz@users.noreply.github.com> Date: Sun, 19 Apr 2026 00:45:40 +0200 Subject: [PATCH 12/22] fix(mcserver): update Ubuntu 24.04 Java dependency to OpenJDK 25 (#4890) Co-authored-by: Daniel Gibbs --- lgsm/data/ubuntu-24.04.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index d130d68c48..ff95bec145 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,openjdk-21-jre +mc,openjdk-25-jre mcb mh mohaa,libstdc++5:i386 From 2a177a8b912e5e45296700a7d6463e7004b5f63a Mon Sep 17 00:00:00 2001 From: Plankt0n Date: Sun, 19 Apr 2026 00:46:28 +0200 Subject: [PATCH 13/22] fix: Update game server directories for HumanitZServer for 1.0 (#4882) 1.0 Changed binary paths, so these needs to be updated manually right now. Hopefully someone can merge this. Co-authored-by: Daniel Gibbs From cba689ab4b60b958cae7a9fc61800e7d16058b8d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 11:12:51 +0100 Subject: [PATCH 14/22] feat(etl): add ET: Legacy downloader and update module (#4896) * feat(etl): add downloader and update support for ET: Legacy Refactors ET: Legacy to use a dedicated update module instead of hardcoded installation files. The new update_etl.sh module leverages the GitHub API to check for, download, and apply the latest builds from GameServerManagers/etlserver-build. * feat(etl): add update_etl module to core modules Registers the update_etl.sh module within the core modules to enable the fetching and execution of ET: Legacy updates. * feat(etl): add update commands to core_getopt Ensures that the update and check-update commands are available for ET: Legacy by including the etl shortname in the getopt command registration logic. * feat(etl): improve local build detection Updates the game log directory to the "legacy" folder and enhances local build detection by parsing etconsole.log for version information, falling back to build.txt if necessary. * feat(etl): update glibc requirement and log path detection Updates the minimum glibc requirement to 2.17 and switches the local build detection to use the gamelogdir variable instead of a hardcoded path. * feat(etl): improve MD5 hash extraction Updates the MD5 hash parsing to use a specific regex for 32-character hexadecimal strings, providing a more robust extraction from the release body than relying on the last field of the line. * feat(xnt): add SHA512 hash extraction for remote builds Updates the Xonotic update module to fetch the SHA512 hash from the remote download server, allowing for build verification and identification. * fix(xnt): derive sha512 URL from remotebuildfilename not remotebuildtag Tag format is xonotic-v0.8.6 but the sha512 file is named xonotic-0.8.6.sha512 (without the v). Using remotebuildtag directly produced a 404. Deriving from remotebuildfilename (which already has the v stripped by tr -d v) gives the correct URL. * fix(core_dl): fix zip extraction with extractsrc across devices and non-empty dirs Using mv to move extracted directories fails in two cases: - Cross-device moves (e.g. tmp and serverfiles on different Docker volumes) - Target directory already exists and is non-empty (update scenario) Replace find+mv with cp -a which handles both cases by copying recursively and merging into the destination. Also replace the hardcoded 'Xonotic' temp_extractdir with ${extractsrc} to be generic. * fix(core_dl): remove duplicate ellipsis in hash verification message --- .../config-lgsm/etlserver/_default.cfg | 4 +- lgsm/modules/command_check_update.sh | 2 + lgsm/modules/command_update.sh | 2 + lgsm/modules/core_dl.sh | 6 +- lgsm/modules/core_getopt.sh | 2 +- lgsm/modules/core_modules.sh | 5 + lgsm/modules/install_server_files.sh | 10 +- lgsm/modules/update_etl.sh | 173 ++++++++++++++++++ lgsm/modules/update_xnt.sh | 1 + 9 files changed, 191 insertions(+), 14 deletions(-) create mode 100644 lgsm/modules/update_etl.sh diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 04ebe4e23e..9679a8f445 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -141,7 +141,7 @@ consoleinteract="yes" # Do not edit gamename="ET: Legacy" engine="idtech3" -glibc="2.7" +glibc="2.17" #### Directories #### # Edit with care @@ -160,7 +160,7 @@ backupdir="${lgsmdir}/backup" ## Logging Directories [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -gamelogdir="${serverfiles}/Logs" +gamelogdir="${serverfiles}/legacy" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index 38f8b4ddc6..6e429512a3 100755 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -34,6 +34,8 @@ elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then update_xnt.sh +elif [ "${shortname}" == "etl" ]; then + update_etl.sh else update_steamcmd.sh fi diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index 6bb30a4c8e..996d402a42 100755 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -35,6 +35,8 @@ elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then update_xnt.sh +elif [ "${shortname}" == "etl" ]; then + update_etl.sh else update_steamcmd.sh fi diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 0a0dacb292..1c27c58d76 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -204,7 +204,7 @@ fn_dl_hash() { fn_print_error_nl "hash length not known for hash type" core_exit.sh fi - echo -en "verifying ${local_filename} with ${hashtype}..." + echo -en "verifying ${local_filename} with ${hashtype}" fn_sleep_time hashsumcmd=$(${hashbin} "${local_filedir}/${local_filename}" | awk '{print $1}') if [ "${hashsumcmd}" != "${hash}" ]; then @@ -267,9 +267,9 @@ fn_dl_extract() { fi elif [ "${mime}" == "application/zip" ]; then if [ -n "${extractsrc}" ]; then - temp_extractdir="${tmpdir}/Xonotic" + temp_extractdir="${tmpdir}/${extractsrc}" extractcmd=$(unzip -qo "${local_filedir}/${local_filename}" "${extractsrc}/*" -d "${temp_extractdir}") - find "${temp_extractdir}/${extractsrc}" -mindepth 1 -maxdepth 1 -exec mv -t "${extractdest}" {} + + cp -a "${temp_extractdir}/${extractsrc}/." "${extractdest}/" rm -rf "${temp_extractdir}" else extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 295f9900ba..ad09bf1df5 100755 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -66,7 +66,7 @@ currentopt=("${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monito currentopt+=("${cmd_update_linuxgsm[@]}") # Exclude noupdate games here. -if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then +if [ "${shortname}" == "jk2" ] || [ "${shortname}" == "etl" ] || [ "${engine}" != "idtech3" ]; then if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ]; then currentopt+=("${cmd_update[@]}" "${cmd_check_update[@]}") # force update for SteamCMD or Multi Theft Auto only. diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index b2bd522a8f..7c717d0adf 100755 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -660,6 +660,11 @@ fn_update_modules.sh() { fn_fetch_module } +update_etl.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + update_fctr.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index c667a7fe49..8a993b45cd 100755 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -80,14 +80,6 @@ fn_install_server_files() { run="norun" force="noforce" md5="2c6be1bb66ea631b9b2e7ae6216c6680" - elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz" - local_filedir="${tmpdir}" - local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz" - chmodx="nochmodx" - run="norun" - force="noforce" - md5="7c08b52cb09b30eadb98ea05ef780fc7" elif [ "${shortname}" == "mohaa" ]; then remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz" local_filedir="${tmpdir}" @@ -280,6 +272,8 @@ elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then update_xnt.sh +elif [ "${shortname}" == "etl" ]; then + update_etl.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/modules/update_etl.sh b/lgsm/modules/update_etl.sh new file mode 100644 index 0000000000..8486343e24 --- /dev/null +++ b/lgsm/modules/update_etl.sh @@ -0,0 +1,173 @@ +#!/bin/bash +# LinuxGSM update_etl.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of ET: Legacy servers. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" + echo "${remotebuild}" > "${serverfiles}/build.txt" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Try to get build version from etconsole.log. + if [ -f "${gamelogdir}/etconsole.log" ]; then + localbuild=$(grep "Initializing legacy game" "${gamelogdir}/etconsole.log" | sed -n 's/.*\^2\(v[0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p' | tail -1) + fi + # Fall back to build.txt if log parse failed or log does not exist. + if [ -z "${localbuild}" ]; then + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Gets remote build info. + apiurl="https://api.github.com/repos/GameServerManagers/etlserver-build/releases/latest" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[] | select(.browser_download_url | contains("i386-et-260b")) | .name') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[] | select(.browser_download_url | contains("i386-et-260b")) | .browser_download_url') + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + remotebuildhash=$(echo "${remotebuildresponse}" | jq -r '.body' | grep 'MD5' | grep -oE '[a-f0-9]{32}') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fail "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" + fn_print_ok_nl "Checking for update: ${remotelocation}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + fn_print_nl "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" + fi + fn_print "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuild}" + + if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir:?}/last-updated.lock" + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + fn_sleep_time_5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + fn_print_nl "* Branch: ${branch}" + fi + fn_print "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuild: ${remotebuild}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="github.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 3a937a9f6a..501f91c8d3 100755 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -55,6 +55,7 @@ fn_update_remotebuild() { remotebuildfilename="${remotebuildfilename}.zip" remotebuildurl="https://dl.xonotic.org/${remotebuildfilename}" remotebuild="${remotebuildtag}" + remotebuildhash=$(curl -s "https://dl.xonotic.org/${remotebuildfilename%.zip}.sha512" | grep "${remotebuildfilename}$" | grep -oE '[a-f0-9]{128}') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" From 9dfbb8eeed4dc49f3979c53ce98d659532606611 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 11:15:31 +0100 Subject: [PATCH 15/22] fix(install_config): replace cp -nv with explicit file existence check (#4897) * fix(install_config): replace cp -nv with explicit file existence check Newer coreutils (Ubuntu 24.04+, Debian 13+) emit a portability warning when using cp -n: 'behavior of -n is non-portable and may change in future'. Replace all cp -nv usages with an explicit [ ! -f dest ] guard, which is portable across all distros and preserves the same OK/SKIP/FAIL behaviour. * fix(install_config): use -e and -L checks to handle broken symlinks Using only -f missed broken symlinks (-e returns false for them but -L returns true). Use both checks to match the skip behaviour of cp -n. --- lgsm/modules/install_config.sh | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 41d4ad866a..ddfc13794e 100755 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -34,8 +34,13 @@ fn_default_config_remote() { if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" echo -en "copying config file [ ${italic}${servercfgfullpath}${default} ]" - changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}") - exitcode=$? + if [ ! -e "${servercfgfullpath}" ] && [ ! -L "${servercfgfullpath}" ]; then + cp "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" + exitcode=$? + [ "${exitcode}" -eq 0 ] && changes="copied" + else + exitcode=0 + fi if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying config file ${servercfgfullpath}" @@ -48,7 +53,13 @@ fn_default_config_remote() { elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then mkdir -p "${servercfgdir}" echo -en "copying config file [ ${italic}${networkcfgfullpath}${default} ]" - changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}") + if [ ! -e "${networkcfgfullpath}" ] && [ ! -L "${networkcfgfullpath}" ]; then + cp "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" + exitcode=$? + [ "${exitcode}" -eq 0 ] && changes="copied" + else + exitcode=0 + fi if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying config file ${networkcfgdefault}" @@ -60,7 +71,13 @@ fn_default_config_remote() { fi elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then echo -en "copying config file [ ${italic}${clustercfgfullpath}${default} ]" - changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}") + if [ ! -e "${clustercfgfullpath}" ] && [ ! -L "${clustercfgfullpath}" ]; then + cp "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" + exitcode=$? + [ "${exitcode}" -eq 0 ] && changes="copied" + else + exitcode=0 + fi if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying config file ${clustercfgfullpath}" @@ -72,7 +89,13 @@ fn_default_config_remote() { fi else echo -en "copying config file [ ${italic}${servercfgdir}/${config}${default} ]" - changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}") + if [ ! -e "${servercfgdir}/${config}" ] && [ ! -L "${servercfgdir}/${config}" ]; then + cp "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" + exitcode=$? + [ "${exitcode}" -eq 0 ] && changes="copied" + else + exitcode=0 + fi if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying config file ${servercfgdir}/${config}" From 0b7aa627c51ea56e39bab8518af4024c50caa009 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:49:03 +0100 Subject: [PATCH 16/22] feat(tf2c): add Team Fortress 2 Classified server (#4898) --- .../config-lgsm/tf2cserver/_default.cfg | 197 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/modules/core_dl.sh | 26 +++ lgsm/modules/install_config.sh | 5 + 4 files changed, 229 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/tf2cserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg new file mode 100644 index 0000000000..baa8c4328c --- /dev/null +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -0,0 +1,197 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# Note that for TF2, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="4koth_frigid" +maxplayers="16" + +## Game Server Login Token (GSLT): Optional +# GSLT can be used for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-game tf2classified -tf_path ${supportdir} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +baseappid="232250" +appid="3557020" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Team Fortress 2 Classified" +engine="source" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/tf2classified" +supportdir="${serverfiles}/tf2" +executabledir="${serverfiles}" +executable="./srcds.sh" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 49d7b1d105..2f964a30d5 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -114,6 +114,7 @@ sven,svenserver,Sven Co-op,ubuntu-24.04 terraria,terrariaserver,Terraria,ubuntu-24.04 tf,tfserver,The Front,ubuntu-24.04 tf2,tf2server,Team Fortress 2,ubuntu-24.04 +tf2c,tf2cserver,Team Fortress 2 Classified,ubuntu-24.04 tfc,tfcserver,Team Fortress Classic,ubuntu-24.04 ti,tiserver,The Isle,ubuntu-24.04 ts,tsserver,The Specialists,ubuntu-24.04 diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 1c27c58d76..dcbd88e9ba 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -81,6 +81,19 @@ fn_dl_steamcmd() { fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then @@ -90,6 +103,19 @@ fn_dl_steamcmd() { fi # All other servers. else + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index ddfc13794e..4b8148ce98 100755 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -724,6 +724,11 @@ elif [ "${shortname}" == "tf2" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "tf2c" ]; then + array_configs+=(server.cfg) + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then array_configs+=(server.cfg) fn_default_config_remote From 7e472ba9accefa06267211b23b7e1fa13a38c02a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 19:54:24 +0000 Subject: [PATCH 17/22] Release v26.1.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 7c717d0adf..10d408449e 100755 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v25.2.0" +modulesversion="v26.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 443e1d8bfb..f664749e6d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v25.2.0" +version="v26.1.0" shortname="core" gameservername="core" commandname="CORE" From a7186b8f7f44b3448b18ce5d3adf54c29f9258fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:12:16 +0000 Subject: [PATCH 18/22] fix(alert_slack): add missing closing brace on section object The 'section' block containing 'fields' and 'accessory' was missing its closing '}' before EOF, producing malformed JSON and breaking all Slack alerts silently (jq -c . would fail on the payload). Also add missing ntfy alert settings to tf2cserver _default.cfg for consistency with other server configs. --- .../config-default/config-lgsm/tf2cserver/_default.cfg | 10 ++++++++++ lgsm/modules/alert_slack.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg index baa8c4328c..fdbcc2cba3 100644 --- a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index defb1f77fe..0cd7106ffa 100755 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -60,6 +60,7 @@ json=$( "image_url": "${alerticon}", "alt_text": "LinuxGSM game icon" } + } EOF ) From d04d5b6dfdcc34d844fc92b5bc1ab9c3b4f1de46 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:16:40 +0000 Subject: [PATCH 19/22] fix: address review feedback - core_dl.sh: use array assignment for steamcmdcommand instead of read -r -a to avoid word-splitting on paths - fix_st.sh: correct module header typo (fix_ts.sh -> fix_st.sh) - command_skeleton.sh: fix grammar 'Creates an copy' -> 'Creates a copy' - serverlist-validate-game-icons.sh: anchor grep to start-of-line and require trailing comma to prevent false positives (e.g. 'tf' matching 'tf2' entries) - cs2server/_default.cfg: remove duplicate ntfy alert settings block --- .github/workflows/serverlist-validate-game-icons.sh | 2 +- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 10 ---------- lgsm/modules/command_skeleton.sh | 2 +- lgsm/modules/core_dl.sh | 6 +++--- lgsm/modules/fix_st.sh | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh index b3ba7e4180..8d35aa906e 100755 --- a/.github/workflows/serverlist-validate-game-icons.sh +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -22,7 +22,7 @@ shopt -s nullglob for gameiconpath in gameicons/*; do gameicon="$(basename "${gameiconpath}")" # check if $gameicon is in serverlist.csv - if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then + if ! grep -q -E "^${gameicon%-icon.png}," serverlist.csv; then echo "ERROR: gameicon ${gameicon} is not in serverlist.csv" exitcode=1 else diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 56948c77f1..8d65b5364a 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -72,16 +72,6 @@ ntfypassword="" ntfypriority="" ntfytags="" -# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy -ntfyalert="off" -ntfytopic="LinuxGSM" -ntfyserver="https://ntfy.sh" -ntfytoken="" -ntfyusername="" -ntfypassword="" -ntfypriority="" -ntfytags="" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 687790a379..3e07edc3aa 100755 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates an copy of a game servers directories. +# Description: Creates a copy of a game server directories. commandname="SKELETON" commandaction="Skeleton" diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index dcbd88e9ba..4730c0cff5 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -46,9 +46,9 @@ fn_dl_steamcmd() { validate="validate" fi - # steamcmdcommand can contain multiple arguments; treat it as an argv array. - steamcmdcommandarray=() - read -r -a steamcmdcommandarray <<< "${steamcmdcommand}" + # Wrap steamcmdcommand as a single-element array to avoid word-splitting + # on paths/commands that should not be tokenised. + steamcmdcommandarray=("${steamcmdcommand}") unbuffercommand=() if [ -n "${unbuffer}" ]; then unbuffercommand=("${unbuffer}") diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh index 598d971b0d..887ea987f8 100755 --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_ts.sh module +# LinuxGSM fix_st.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com From 329660d8b97b75c18ba579b925161ae5978ebb80 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:51:10 +0000 Subject: [PATCH 20/22] fix(vints): assign remotebuild instead of unused remotebuildversion The API version lookup was setting remotebuildversion but all subsequent jq queries used ${remotebuild}, which was never populated. This caused 'Unable to get remote build' on every install/update. --- lgsm/modules/update_vints.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 86a7156ee0..5bf3df25d0 100755 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -39,11 +39,11 @@ fn_update_remotebuild() { apiurl="http://api.vintagestory.at/stable-unstable.json" remotebuildresponse=$(curl -s "${apiurl}") if [ "${branch}" == "stable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) elif [ "${branch}" == "unstable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) else - remotebuildversion="${branch}" + remotebuild="${branch}" fi remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename') remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn') From a14433c2f0f62c593bccab58e4668eb114eb0423 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:01:35 +0000 Subject: [PATCH 21/22] fix(xnt): unset exitbypass after command_stop.sh in fn_update_localbuild --- lgsm/modules/update_xnt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 501f91c8d3..904b7b1a46 100755 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -29,7 +29,9 @@ fn_update_localbuild() { exitbypass=1 fn_sleep_time_5 tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + exitbypass=1 command_stop.sh + unset exitbypass fn_firstcommand_reset fi From db4253f002209b9cb1b489ea38a2de93f4553071 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:06:52 +0000 Subject: [PATCH 22/22] fix(ci): resolve super-linter failures - Set DEFAULT_BRANCH to current branch to fix 'master not found' error - Use fetch-depth: 0 so GITHUB_BEFORE_SHA can be resolved - Set update_etl.sh executable bit (BASH_EXEC) - Fix .codespellrc tab indentation (EDITORCONFIG) - Add .gitleaks.toml allowlist for GA4 Measurement Protocol API secret (GITLEAKS) - Fix .markdown-lint.yml: disable MD030/MD013/MD033/MD041/MD051 to match existing repo style (MARKDOWN) --- .github/linters/.codespellrc | 10 +++++----- .github/linters/.gitleaks.toml | 9 +++++++++ .github/linters/.markdown-lint.yml | 11 ++++------- .github/workflows/action-super-linter.yml | 6 +++--- lgsm/modules/update_etl.sh | 0 5 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .github/linters/.gitleaks.toml mode change 100644 => 100755 lgsm/modules/update_etl.sh diff --git a/.github/linters/.codespellrc b/.github/linters/.codespellrc index 2290668812..47dd5ccea3 100644 --- a/.github/linters/.codespellrc +++ b/.github/linters/.codespellrc @@ -1,11 +1,11 @@ [codespell] # Skip data tables that contain many short server identifiers (e.g. "fof", "nd") skip = - lgsm/data/*.csv, - package-lock.json, - */package-lock.json, - node_modules, - */node_modules/* + lgsm/data/*.csv, + package-lock.json, + */package-lock.json, + node_modules, + */node_modules/* # Ignore common identifiers/acronyms and extensions used throughout LinuxGSM ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty diff --git a/.github/linters/.gitleaks.toml b/.github/linters/.gitleaks.toml new file mode 100644 index 0000000000..b61845ba60 --- /dev/null +++ b/.github/linters/.gitleaks.toml @@ -0,0 +1,9 @@ +title = "LinuxGSM Gitleaks Config" + +[allowlist] + description = "Known false positives" + regexes = [ + # Google Analytics 4 Measurement Protocol API secret - not a sensitive credential, + # it is intentionally embedded in client-side code and is safe to be public. + '''apisecret="[A-Za-z0-9_\-]+"''', + ] diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 094bbbcd6d..62d421814f 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -12,12 +12,9 @@ MD013: false # MD033: The main README uses inline HTML for badges. MD033: false -# Match existing list formatting in this repo. +# MD007: Repo uses 2-space indentation for nested lists. MD007: - indent: 4 + indent: 2 -MD030: - ul_single: 3 - ol_single: 2 - ul_multi: 3 - ol_multi: 2 +# MD030: Repo mixes 1-space unordered and 2-space ordered list markers. +MD030: false diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index de396dcd47..e2755e20ac 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -27,9 +27,8 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - # Shallow clone reduces transient fetch failures (HTTP 500) from GitHub. - # We lint the whole codebase instead of relying on git history. - fetch-depth: 1 + # Full clone required so super-linter can resolve GITHUB_BEFORE_SHA. + fetch-depth: 0 fetch-tags: false persist-credentials: false @@ -42,6 +41,7 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BRANCH: ${{ github.ref_name }} VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false diff --git a/lgsm/modules/update_etl.sh b/lgsm/modules/update_etl.sh old mode 100644 new mode 100755