Explorar o código

install 脚本修复sed的使用bug

tangs %!s(int64=6) %!d(string=hai) anos
pai
achega
7e963e1eb0
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      install.sh

+ 4 - 4
install.sh

@@ -30,10 +30,10 @@ elif [[ "" == $server_user ]]; then
 fi
 
 serverd=/etc/init.d/${server_name}d
-cp server.sh $serverd
+cp -f server.sh $serverd
 
-sed -i s/SERVER_NAME/${server_name}/ serverd
-sed -i s/SERVER_USER/$server_user/ serverd
-sed -i s/SERVER_DAEMON/$server_exec/ serverd
+sed -i "s!SERVER_NAME!$server_name!" $serverd
+sed -i "s!SERVER_USER!$server_user!" $serverd
+sed -i "s!SERVER_DAEMON!$server_exec!" $serverd
 
 echo "Install success!!!"