Explorar o código

Merge branch 'develop' into feature/2196-qwserver

Daniel Gibbs %!s(int64=7) %!d(string=hai) anos
pai
achega
6b3399a1f0

+ 15 - 3
lgsm/functions/check_deps.sh

@@ -10,7 +10,11 @@ fn_install_mono_repo(){
 	if [ "${monostatus}" != "0" ]; then
 		fn_print_dots "Adding Mono repository"
 		sleep 0.5
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			fn_print_info_nl "Automatically adding Mono repository."
 			fn_script_log_info "Automatically adding Mono repository."
@@ -101,7 +105,11 @@ fn_install_universe_repo(){
 		fn_print_warning_nl "Ubuntu 18.04.1 contains a bug which means the sources.list file does not populate with the Ubuntu universe repository."
 		fn_print_information_nl "Attempting to add Universe Repo"
 		sleep 0.5
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			echo -en ".\r"
 			sleep 1
@@ -228,7 +236,11 @@ fn_found_missing_deps(){
 			fn_print_warning_nl "jq is not available in the ${distroname} repository"
 			echo "	* https://docs.linuxgsm.com/requirements/jq"
 		fi
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			fn_print_information_nl "Automatically installing missing dependencies."
 			fn_script_log_info "Automatically installing missing dependencies."

+ 1 - 1
lgsm/functions/check_permissions.sh

@@ -181,7 +181,7 @@ fn_sys_perm_fix_manually_msg(){
 
 # Attempt to fix /sys related permission errors if sudo is available, exits otherwise
 fn_sys_perm_errors_fix(){
-	sudo -v > /dev/null 2>&1
+	sudo -n true > /dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		fn_print_dots "Automatically fixing /sys permissions"
 		sleep 0.5

+ 0 - 11
lgsm/functions/fix_csgo.sh

@@ -32,14 +32,3 @@ if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\.
 	sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
 	fn_fix_msg_end
 fi
-
-# Fixes: workshop map issue.
-# http://forums.steampowered.com/forums/showthread.php?t=3170366.
-if [ -f "${systemdir}/subscribed_collection_ids.txt" ]||[ -f "${systemdir}/subscribed_file_ids.txt" ]||[ -f "${systemdir}/ugc_collection_cache.txt" ]; then
-	fixname="workshop map"
-	fn_fix_msg_start
-	rm -f "${systemdir}/subscribed_collection_ids.txt"
-	rm -f "${systemdir}/subscribed_file_ids.txt"
-	rm -f "${systemdir}/ugc_collection_cache.txt"
-	fn_fix_msg_end
-fi