Sfoglia il codice sorgente

Added donate option

Daniel Gibbs 7 anni fa
parent
commit
77bb111830

+ 18 - 0
lgsm/functions/command_donate.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+# LinuxGSM command_donate.sh function
+# Author: Daniel Gibbs
+# Website: https://linuxgsm.com
+# Description: Shows ways to donate
+
+echo -e ""
+echo -e "${lightyellow}Support LinuxGSM${default}"
+echo -e "================================="
+echo -e ""
+echo -e "Been using LinuxGSM?"
+echo -e "Consider donating to support development."
+echo -e ""
+echo -e "* ${blue}Patreon:${default} https://linuxgsm.com/patreon"
+echo -e "* ${blue}PayPal:${default} https://linuxgsm.com/paypal"
+echo -e "* ${blue}Flattr:${default} https://linuxgsm.com/flattr"
+echo -e ""
+echo -e "LinuxGSM has been going since 2012"

+ 10 - 4
lgsm/functions/core_functions.sh

@@ -51,6 +51,12 @@ fn_fetch_function
 
 # Commands
 
+
+command_backup.sh(){
+functionfile="${FUNCNAME}"
+fn_fetch_function
+}
+
 command_console.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
@@ -61,22 +67,22 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-command_postdetails.sh(){
+command_details.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-command_details.sh(){
+command_donate.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-command_test_alert.sh(){
+command_postdetails.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-command_backup.sh(){
+command_test_alert.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
 }

+ 6 - 1
lgsm/functions/core_getopt.sh

@@ -20,6 +20,7 @@ cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the serve
 cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." )
 cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." )
 cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." )
+cmd_donate=( "do;donate" "command_donate.sh" "Donation options." )
 # Console servers only
 cmd_console=( "c;console" "command_console.sh" "Access server console." )
 cmd_debug=( "d;debug" "command_debug.sh" "Start server directly in your terminal." )
@@ -51,6 +52,7 @@ cmd_dev_detect_ldd=( "dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect require
 cmd_dev_query_raw=( "qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery." )
 cmd_dev_clear_functions=( "cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir." )
 
+
 ### Set specific opt here ###
 
 currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" )
@@ -136,6 +138,9 @@ if [ -f ".dev-debug" ]; then
 	currentopt+=( "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}" )
 fi
 
+## Donate
+currentopt+=( "${cmd_donate[@]}" )
+
 ### Build list of available commands
 optcommands=()
 index="0"
@@ -150,7 +155,7 @@ done
 fn_opt_usage(){
 	echo "Usage: $0 [option]"
 	echo -e ""
-	echo "${gamename} - Linux Game Server Manager - Version ${version}"
+	echo "LinuxGSM - ${gamename} - Version ${version}"
 	echo "https://linuxgsm.com/${gameservername}"
 	echo -e ""
 	echo -e "${lightyellow}Commands${default}"

+ 4 - 4
lgsm/functions/install_header.sh

@@ -10,9 +10,9 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 clear
 echo "================================="
-echo "${gamename}"
-echo "Linux Game Server Manager"
+echo "LinuxGSM - ${gamename}"
 echo "by Daniel Gibbs"
-echo "Contributors: http://goo.gl/qLmitD"
-echo "https://linuxgsm.com"
+echo "Website: https://linuxgsm.com"
+echo "Contributors: https://linuxgsm.com/contrib"
+echo "Donate: https://linuxgsm.com/donate"
 echo "================================="