Browse Source

Modified init method

Paolo Galli 4 years ago
parent
commit
bce117140a
1 changed files with 5 additions and 38 deletions
  1. 5 38
      lcmlog-server-utils

+ 5 - 38
lcmlog-server-utils

@@ -45,13 +45,9 @@ method_init()
 		else
 			echo "Setting up auth folder..."
 			mkdir $DIR/auth
-			touch $DIR/auth/UPDATE
-			mkdir $DIR/auth/150
-			touch $DIR/auth/150/GET
-			touch $DIR/auth/150/POST
-			mkdir $DIR/auth/Admin
-			touch $DIR/auth/Admin/GET
-			touch $DIR/auth/Admin/POST
+			touch $DIR/auth/150
+			touch $DIR/auth/Admin
+			touch $DIR/auth/Valhalla
 			echo "Completed."
 		fi
 
@@ -73,37 +69,8 @@ method_init()
 			echo "Completed."
 		fi
 
-		# chmod to let everyone write their logs
-		echo
-		echo "To correct run the program, you should set the following permissions:"
-		echo "  755 for $(cd $DIR/.. && pwd) , $DIR and $DIR/auth"
-		echo "  777 for $DIR/data and $DIR/logs"
-
-		echo "Do you want to set these permissions (chmod)? [y|n]"
-
-		read ANSWER
-		while [ -z $ANSWER ]; do
-			echo "Yes (y) or no (n)? "
-			read ANSWER
-		done
-
-		while [ $ANSWER != "y" ] && [ $ANSWER != "n" ]; do
-			echo "Yes (y) or no (n)? "
-			read ANSWER
-
-			while [ -z $ANSWER ]; do
-				echo  "Yes (y) or no (n)? "
-				read ANSWER
-			done
-		done
-
-		if [ $ANSWER == "y" ]; then
-			chmod 755 $DIR/..
-			chmod 755 $DIR
-			chmod 755 $DIR/auth
-			chmod 777 $DIR/data
-			chmod 777 $DIR/logs
-		fi
+		echo "Now you should add entries in auth files and then update folder permissions using the flag -u"
+		
 	fi
 }