Browse Source
This moves all the defining functions to its own file and out of the main script file. This has made the main scrip file much smaller and moved most code to the functions dirpull/254/merge
1 changed files with 171 additions and 0 deletions
@ -0,0 +1,171 @@ |
|||
#!/bin/bash |
|||
# LGSM fn_functions function |
|||
# Author: Daniel Gibbs |
|||
# Website: http://danielgibbs.co.uk |
|||
# Version: 241214 |
|||
# |
|||
# Description: Defines all functions to allow download and execution of functions using fn_runfunction. |
|||
# This function is called first before any other function. Without this file other functions would not load. |
|||
|
|||
fn_autoip(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_backupserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_console(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_debugserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_details(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_distro(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_emailnotification(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_emailtest(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_load(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_monitorserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_logmanager(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_restartserver(){ |
|||
fn_scriptlog "Restarting ${servername}" |
|||
fn_stopserver |
|||
fn_startserver |
|||
} |
|||
|
|||
fn_rootcheck(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_serverquery(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_startserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_stopserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_syscheck(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_updateserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_uptime(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_validateserver(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
# |
|||
## Installer functions |
|||
# |
|||
|
|||
fn_autoinstall(){ |
|||
autoinstall=1 |
|||
fn_install |
|||
} |
|||
|
|||
fn_getquery(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_glibcfix(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_header(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_loginstall(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_retryinstall(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_serverdirectory(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_serverconfig(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_steamdl(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_steamfix(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
fn_steaminstall(){ |
|||
functionfile="${FUNCNAME}" |
|||
fn_runfunction |
|||
} |
|||
|
|||
# Calls on-screen messages |
|||
fn_messages |
Loading…
Reference in new issue