Daniel Gibbs 11 роки тому
батько
коміт
2cbb358b6f
1 змінених файлів з 47 додано та 0 видалено
  1. 47 0
      functions/fn_getopt

+ 47 - 0
functions/fn_getopt

@@ -0,0 +1,47 @@
+#!/bin/bash
+# LGSM fn_getopt function
+# Author: Daniel Gibbs
+# Website: http://danielgibbs.co.uk
+# Version: 190115
+
+# Description: getopt arguments.
+
+case "$getopt" in
+	start)
+		fn_start;;
+	stop)
+		fn_stop;;
+	restart)
+		fn_restart;;
+	update)
+		norestart=1;
+		fn_update_check;;
+	update-restart)
+		fn_update_check;;
+	validate)
+		fn_validate;;
+	validate-restart)
+		fn_stop
+		fn_validate
+		fn_start;;
+	monitor)
+		fn_monitor;;
+	email-test)
+		fn_email_test;;
+	details)
+		fn_details;;
+	backup)
+		fn_backup;;
+	console)
+		fn_console;;
+	debug)
+		fn_debug;;
+	install)
+		fn_install;;
+	auto-install)
+		fn_autoinstall;;
+	*)
+	echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install|auto-install}"
+	exit 1;;
+esac
+exit