Browse Source

Added permissions alert

an alert will go out if there is a permissions issue
pull/1323/head
Daniel Gibbs 8 years ago
parent
commit
4376a540fc
  1. 14
      lgsm/functions/alert.sh
  2. 4
      lgsm/functions/check_permissions.sh

14
lgsm/functions/alert.sh

@ -31,14 +31,22 @@ fn_alert_update(){
alertbody="${servicename} received update"
}
if [ "${alert}" == "restart" ]; then
fn_alert_permissions(){
fn_script_log_info "Sending permissions error alert"
alertsubject="LinuxGSM - Permissions Error - ${servername}"
alertbody="${servicename} has permissions issues."
}
if [ "${alert}" == "permissions" ]; then
fn_alert_permissions
elif [ "${alert}" == "restart" ]; then
fn_alert_restart
elif [ "${alert}" == "restartquery" ]; then
fn_alert_restart_query
elif [ "${alert}" == "update" ]; then
fn_alert_update
elif [ "${alert}" == "test" ]; then
fn_alert_test
elif [ "${alert}" == "update" ]; then
fn_alert_update
fi
if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then

4
lgsm/functions/check_permissions.sh

@ -43,8 +43,10 @@ fn_check_ownership(){
} | column -s $'\t' -t | tee -a "${scriptlog}"
echo ""
fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found"
fn_print_information_nl "please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found"
fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found"
alert="permissions"
alert.sh
core_exit.sh
fi
}

Loading…
Cancel
Save