build_cube.sh 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. #!/bin/bash
  2. set -e
  3. Version=18.0
  4. Cuda=NO
  5. kernel_custom=YES
  6. Webmin="webmin-2.105"
  7. kernel_dkms="5.15.0-71-generic"
  8. driver=NVIDIA
  9. if (( $EUID != 0 )); then
  10. echo -e "$(tput setaf 11)This must be run as root. Try 'sudo $0'.$(tput sgr0)"
  11. exit 1
  12. fi
  13. clear
  14. function ubuntu_version_check {
  15. if [[ $(lsb_release -rs) == "20.04" ]]
  16. then
  17. Ubuntu_version="20.04.5"
  18. else
  19. echo "Non-compatible version"
  20. exit 0
  21. fi
  22. }
  23. function print_centered {
  24. [[ $# == 0 ]] && return 1
  25. declare -i TERM_COLS="$(tput cols)"
  26. declare -i str_len="${#1}"
  27. [[ $str_len -ge $TERM_COLS ]] && {
  28. echo "$1";
  29. return 0;
  30. }
  31. declare -i filler_len="$(( (TERM_COLS - str_len) / 2 ))"
  32. [[ $# -ge 2 ]] && ch="${2:0:1}" || ch=" "
  33. filler=""
  34. for (( i = 0; i < filler_len; i++ )); do
  35. filler="${filler}${ch}"
  36. done
  37. printf "%s%s%s" "$filler" "$1" "$filler"
  38. [[ $(( (TERM_COLS - str_len) % 2 )) -ne 0 ]] && printf "%s" "${ch}"
  39. printf "\n"
  40. return 0
  41. }
  42. function decompte_ {
  43. echo -e "$(tput setaf 10)\nReboot in 10 seconds (CRTL+C to abord):$(tput sgr0)"
  44. for i in {9..0}
  45. do
  46. echo -e -n "$i "
  47. sleep 1
  48. done
  49. echo ""
  50. sudo reboot
  51. }
  52. function intro_ {
  53. print_centered "$(tput setaf 5)"
  54. print_centered " ██████╗██╗ ██╗██████╗ ███████╗"
  55. print_centered "██╔════╝██║ ██║██╔══██╗██╔════╝"
  56. print_centered "██║ ██║ ██║██████╔╝█████╗ "
  57. print_centered "██║ ██║ ██║██╔══██╗██╔══╝ "
  58. print_centered "╚██████╗╚██████╔╝██████╔╝███████╗"
  59. print_centered " ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝"
  60. echo -n "$(tput sgr0)"
  61. print_centered "Cube Server installation script v$Version"
  62. print_centered "Ubuntu version 20.04"
  63. print_centered "GA990xa-ud3 $Drivers"
  64. if [ $Cuda = "YES" ]
  65. then
  66. print_centered "CUDA version"
  67. fi
  68. sleep 3
  69. }
  70. function update_ {
  71. if [ -f /home/wareck/.pass2 ] && [ ! -f /home/wareck/.pass3 ] && [ ! -f /home/wareck/.pass4 ]
  72. then
  73. echo -e "$(tput setaf 10)\nUpdate and install packages:$(tput sgr0)"
  74. sudo apt-get update
  75. echo -e ""
  76. sudo apt-get install lxde lxde-icon-theme -y
  77. echo -e ""
  78. sudo apt-get install samba cifs-utils mdadm git build-essential libtool pkg-config automake autoconf ethtool net-tools openvpn filezilla \
  79. tasksel lzma-dev lzma cmake libuv1-dev libssl-dev msr-tools tightvncserver lm-sensors openssh-server xfsprogs -y
  80. echo -e ""
  81. sudo apt-get install pixz pbzip2 pigz btrfs-progs gparted gpart gnome-remote-desktop libcanberra-gtk-module \
  82. ctorrent libcurl4-openssl-dev bison byacc screen libudev-dev libjansson-dev libncurses5-dev libmicrohttpd-dev curl nvme-cli -y
  83. echo -e ""
  84. sudo apt-get install libglib2.0-dev libgtk2.0-dev libsensors4-dev htop vlc locate cmake -y
  85. echo -e ""
  86. if [ $Cuda = "YES" ]
  87. then
  88. echo -e "$(tput setaf 10)\nInstall Cuda packages:$(tput sgr0)"
  89. sudo apt-get install libgmp-dev libnuma-dev cmake libuv1-dev nvidia-cuda-dev libmicrohttpd-dev gcc-8 g++-8 nvidia-cuda-toolkit -y
  90. fi
  91. echo -e "Done."
  92. fi
  93. }
  94. function kernel_check_ {
  95. unamestr=$(uname -r)
  96. case $kernel_custom in
  97. NO)
  98. if [[ "$unamestr" == '5.15.0-69-generic' ]]
  99. then
  100. echo -e "\n$(tput setaf 10)DKMS Kernel install :$(tput sgr0)"
  101. sudo rm /boot/config-5.15*
  102. sudo rm /boot/initrd.img-5.15*
  103. sudo rm /boot/System.map-5.15*
  104. sudo rm /boot/vmlinuz-5.15*
  105. sudo apt-get install linux-image-5.4.0-54-generic linux-headers-5.4.0-54-generic linux-modules-extra-5.4.0-54-generic htop -y
  106. sudo update-grub2
  107. sudo apt-mark hold linux-image-5.4.0-54-generic linux-headers-5.4.0-54-generic linux-modules-extra-5.4.0-54-generic
  108. autoroot_
  109. decompte_
  110. fi
  111. if [[ "$unamestr" == '5.4.0-139-generic' ]]
  112. then
  113. sudo rm /boot/config-5.4.0-139-generic | true
  114. sudo rm /boot/System.map-5.4.0-139-generic | true
  115. sudo rm /boot/initrd.img-5.4.0-139-generic | true
  116. sudo rm /boot/vmlinuz-5.4.0-139-generic | true
  117. sudo update-grub2
  118. sudo apt-mark hold linux-image-$kernel_dkms linux-headers-$kernel_dkms linux-modules-extra-$kernel_dkms
  119. autoroot_
  120. decompte_
  121. fi
  122. ;;
  123. YES)
  124. if [ -f /tmp/ksource.txt ]; then rm /tmp/ksource.txt;fi
  125. wget -c -q http://192.168.1.8:3000/wareck/custom_kernel/raw/master/ksource.txt -O /tmp/ksource.txt
  126. source /tmp/ksource.txt
  127. if ! [[ "$unamestr" == $KLversion ]]
  128. then
  129. echo -e "\n$(tput setaf 10)Custom kernel install $(tput setaf 9)$KLversion$(tput setaf 10) (fix DKMS/WOL) :$(tput sgr0)"
  130. cd /tmp/
  131. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/custom_kernel/$kernel_version
  132. chmod +x $kernel_version
  133. sudo ./$kernel_version
  134. nvidia_driver_
  135. autoroot_
  136. decompte_
  137. fi
  138. ;;
  139. esac
  140. }
  141. function nvidia_driver_ {
  142. if ! [ -f /home/wareck/.pass1 ]
  143. then
  144. if ! [ -f /etc/modprobe.d/blacklist-nvidia-nouveau.conf ]
  145. then
  146. echo "Blacklist nvidia-nouveau driver..."
  147. echo "System will reboot"
  148. sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
  149. sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
  150. fi
  151. case $Cuda in
  152. NO)
  153. sudo apt-get install build-essential libglvnd-dev cmake -y
  154. ;;
  155. YES)
  156. sudo apt-get install build-essential libglvnd-dev cmake libhugetlbfs-dev libc-dev libc6-dev g++ -y
  157. ;;
  158. *)
  159. ;;
  160. esac
  161. #sudo update-initramfs -u
  162. touch /home/wareck/.pass1
  163. decompte_
  164. fi
  165. if ! [ -f /home/wareck/.pass2 ]
  166. then
  167. sleep 1
  168. case $Cuda in
  169. NO)
  170. echo -e "$(tput setaf 10)\nInstall NVIDIA GTX1080 Drivers :$(tput sgr0)"
  171. sleep 3
  172. sudo apt-get install nvidia-driver-525 -y
  173. touch /home/wareck/.pass2
  174. decompte_
  175. ;;
  176. YES)
  177. echo -e "$(tput setaf 10)\nInstall CUDA Drivers :$(tput sgr0)"
  178. cd /home/wareck/
  179. echo -e "Download MegaDownload:"
  180. git clone https://github.com/wareck/megadown.git
  181. sudo cp /home/wareck/megadown/megadown /usr/local/bin/megadown
  182. sudo rm -r /home/wareck/megadown
  183. #megadown https://mega.nz/file/r0wwnZCJ#27WWRMwSsGYXiMUHf2OgcGYp2O2itChsBxcK9znmr5E
  184. #chmod +x cuda_11.8.0_520.61.05_linux.run
  185. #sudo ./cuda_11.8.0_520.61.05_linux.run
  186. #sudo rm cuda_11.8.0_520.61.05_linux.run
  187. #wget -c https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
  188. #megadown https://mega.nz/file/u9h1wbYL#QuHtEpCErWXDFjjMVFTK9QzcAI5SrsgTMbx6DfFJT2k
  189. #wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.run
  190. wget https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux.run
  191. chmod +x cuda_12.3.1_545.23.08_linux.run
  192. sudo ./cuda_12.3.1_545.23.08_linux.run --silent --driver --toolkit
  193. sudo rm cuda_12.3.1_545.23.08_linux.run
  194. touch /home/wareck/.pass2
  195. decompte_
  196. ;;
  197. esac
  198. fi
  199. }
  200. function download_packs_ {
  201. if [ ! -f /home/wareck/.pass3 ]
  202. then
  203. echo -e "$(tput setaf 10)\nDownload complement packs:$(tput sgr0)"
  204. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cgminer.conf -O /home/wareck/Build_Cube/pack/cgminer.conf
  205. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/chia-miner.tar.xz -O /home/wareck/Build_Cube/pack/chia-miner.tar.xz
  206. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gerbera.tar.xz -O /home/wareck/Build_Cube/pack/gerbera.tar.xz
  207. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/start_cgminer.tar.xz -O /home/wareck/Build_Cube/pack/start_cgminer.tar.xz
  208. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/$Webmin.tar.xz -O /home/wareck/Build_Cube/pack/$Webmin.tar.xz
  209. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/xmrig.tar.xz -O /home/wareck/Build_Cube/pack/xmrig.tar.xz
  210. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/zfsmanager-0.0.4.wbm.gz -O /home/wareck/Build_Cube/pack/zfsmanager-0.0.4.wbm.gz
  211. wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gpu-miners.tar.xz -O /home/wareck/Build_Cube/pack/gpu-miners.tar.xz
  212. cp /home/wareck/Build_Cube/pack/gpu-miners.tar.xz /home/wareck
  213. cp /home/wareck/Build_Cube/pack/pack1.tar.xz /home/wareck
  214. cp /home/wareck/Build_Cube/pack/pack2.tar.xz /home/wareck
  215. cp /home/wareck/Build_Cube/pack/pack3.tar.xz /home/wareck
  216. cp /home/wareck/Build_Cube/pack/xmrig.tar.xz /home/wareck
  217. cp /home/wareck/Build_Cube/pack/start_cgminer.tar.xz /home/wareck
  218. echo "Done."
  219. if [ ! -d /home/wareck/$Webmin ]
  220. then
  221. cp /home/wareck/Build_Cube/pack/$Webmin.tar.xz /home/wareck/
  222. cd /home/wareck/
  223. echo -e "$(tput setaf 10)\nWebmin uncompress:$(tput sgr0)"
  224. tar xfJ $Webmin.tar.xz
  225. rm $Webmin.tar.xz
  226. echo -e "Done"
  227. fi
  228. echo -e "$(tput setaf 10)\nDownloading miners:$(tput sgr0)"
  229. cd /home/wareck
  230. if ! [ -d miners ]; then mkdir -p miners;fi
  231. cd /home/wareck/miners
  232. if ! [ -d xmrig ]
  233. then
  234. git clone https://github.com/xmrig/xmrig.git
  235. echo -e ""
  236. fi
  237. if ! [ -d xmr-stak ]
  238. then
  239. git clone https://github.com/fireice-uk/xmr-stak.git
  240. echo -e ""
  241. fi
  242. if ! [ -d xmr-stak-rx ]
  243. then
  244. git clone https://github.com/fireice-uk/xmr-stak.git -b xmr-stak-rx xmr-stak-rx
  245. echo -e ""
  246. fi
  247. if ! [ -d cgminer-gekko ]
  248. then
  249. git clone https://github.com/wareck/cgminer-gekko.git
  250. echo -e ""
  251. fi
  252. if ! [ -d cgminer-lketc ]
  253. then
  254. git clone https://github.com/wareck/cgminer-lketc.git
  255. fi
  256. fi
  257. echo "Done."
  258. }
  259. function build_miners_ {
  260. if [ ! -f /home/wareck/.pass3 ]
  261. then
  262. cmake_ #check cmake version
  263. cd /home/wareck
  264. tar xfJ gpu-miners.tar.xz
  265. cd /home/wareck/miners
  266. echo -e "$(tput setaf 10)\nBuild Cgminer-gekko:$(tput sgr0)"
  267. cd cgminer-gekko
  268. sudo usermod -a -G dialout,plugdev wareck
  269. sudo cp 01-cgminer.rules /etc/udev/rules.d/
  270. CFLAGS="-O2 -march=native" ./autogen.sh
  271. ./configure --enable-gekko
  272. make -j$((`nproc`+1))
  273. tar xfJ /home/wareck/start_cgminer.tar.xz
  274. rm /home/wareck/start_cgminer.tar.xz
  275. cd ..
  276. cat <<'EOF'>> /tmp/cgminer
  277. #!/bin/sh -e
  278. ### BEGIN INIT INFO
  279. # Provides: cgminer
  280. # Required-Start: networking
  281. # Default-Start: 3 4 5
  282. # Default-Stop: 0 6
  283. ### END INIT INFO
  284. case "$1" in
  285. start)
  286. cd /home/wareck/miners/cgminer-gekko/
  287. su wareck -c "screen -dmS cgminer /home/wareck/miners/cgminer-gekko/cgminer"
  288. ;;
  289. stop)
  290. sudo killall -9 cgminer | true
  291. ;;
  292. *)
  293. echo "Usage: /etc/init.d/cgminer {start|stop}"
  294. exit 1
  295. ;;
  296. esac
  297. exit 0
  298. EOF
  299. chmod +x /tmp/cgminer
  300. sudo cp /tmp/cgminer /etc/init.d/cgminer
  301. sudo update-rc.d cgminer defaults
  302. if ! [ -d /home/wareck/.cgminer ]
  303. then
  304. mkdir /home/wareck/.cgminer
  305. fi
  306. cat <<'EOF'>> /tmp/cgminer.conf
  307. {
  308. "pools" : [
  309. {
  310. "url" : "stratum+tcp://stratum.braiins.com:3333",
  311. "user" : "wareck.gekko",
  312. "pass" : "x"
  313. }
  314. ]
  315. ,
  316. "api-description" : "cgminer 4.12.0-wrk",
  317. "api-mcast-addr" : "224.0.0.75",
  318. "api-mcast-code" : "FTW",
  319. "api-mcast-des" : "",
  320. "api-mcast-port" : "4028",
  321. "api-port" : "4028",
  322. "api-host" : "0.0.0.0",
  323. "gekko-lowboost" : true,
  324. "gekko-2pac-freq" : "155.0",
  325. "gekko-compac-freq" : "150.0",
  326. "gekko-tune-down" : "95.0",
  327. "gekko-tune-up" : "97.0",
  328. "gekko-wait-factor" : "0.5",
  329. "gekko-bauddiv" : "0",
  330. "gekko-newpac-freq" : "100",
  331. "gekko-start-freq" : "100",
  332. "gekko-step-freq" : "6.2",
  333. "gekko-step-delay" : "15",
  334. "gekko-tune2" : "0",
  335. "fallback-time" : "120",
  336. "hotplug" : "5",
  337. "log" : "5",
  338. "shares" : "0",
  339. "suggest-diff" : "0"
  340. }
  341. EOF
  342. cp /tmp/cgminer.conf /home/wareck/.cgminer/
  343. echo "Done."
  344. cd /home/wareck/miners
  345. echo -e "$(tput setaf 10)\nBuild Cgminer-lketc:$(tput sgr0)"
  346. cd cgminer-lketc
  347. CFLAGS="-O2 -march=native" ./autogen.sh
  348. ./configure
  349. make -j$((`nproc`+1))
  350. cd ..
  351. echo "Done."
  352. echo -e "$(tput setaf 10)\nUncompress xmr files:$(tput sgr0)"
  353. tar xfJ /home/wareck/xmrig.tar.xz --checkpoint=.100
  354. echo "Done."
  355. echo -n -e "\n"
  356. echo -e "$(tput setaf 10)\nBuild xmrig:$(tput sgr0)"
  357. cd xmrig
  358. git config --global --add safe.directory /home/wareck/miners/xmrig
  359. git pull
  360. sed -i "s/kDefaultDonateLevel = 5;/kDefaultDonateLevel = 0;/g" src/donate.h
  361. sed -i "s/kMinimumDonateLevel = 1;/kMinimumDonateLevel = 0;/g" src/donate.h
  362. wget -c https://download.open-mpi.org/release/hwloc/v2.7/hwloc-2.7.1.tar.bz2
  363. tar xfj hwloc-2.7.1.tar.bz2 --checkpoint=.100
  364. cd hwloc-2.7.1
  365. ./configure
  366. make -j$((`nproc`+1))
  367. sudo make install
  368. cd ..
  369. sudo ldconfig
  370. cd build
  371. cmake ..
  372. make -j$((`nproc`+1))
  373. cd ..
  374. cd ..
  375. echo "Done."
  376. #echo -e "$(tput setaf 10)\nBuild xmrig-upx:$(tput sgr0)"
  377. #cd xmrig-upx
  378. #git config --global --add safe.directory /home/wareck/miners/xmrig-upx
  379. #git pull
  380. #sed -i "s/kDefaultDonateLevel = 5;/kDefaultDonateLevel = 0;/g" src/donate.h
  381. #sed -i "s/kMinimumDonateLevel = 1;/kMinimumDonateLevel = 0;/g" src/donate.h
  382. #cd build
  383. #cmake .. -DWITH_HTTPD=OFF
  384. #make -j$((`nproc`+1))
  385. #cd ..
  386. #cd ..
  387. #echo "Done."
  388. rm -r -f xmrig-upx
  389. echo -e "$(tput setaf 10)\nBuild xmr-stak-rx:$(tput sgr0)"
  390. cd xmr-stak-rx
  391. git config --global --add safe.directory /home/wareck/miners/xmr-stak-rx
  392. git pull
  393. cd build
  394. cmake ..
  395. make -j$((`nproc`+1))
  396. cd ..
  397. cd ..
  398. echo "Done."
  399. echo -e "$(tput setaf 10)\nBuild xmr-stak:$(tput sgr0)"
  400. cd xmr-stak
  401. if ! [ -d build ];then mkdir build ;fi
  402. git config --global --add safe.directory /home/wareck/miners/xmr-stak
  403. git pull
  404. cd build
  405. cmake .. -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=OFF
  406. make -j$((`nproc`+1))
  407. cd ..
  408. cd ..
  409. echo "Done."
  410. if [ $Cuda = "YES" ]
  411. then
  412. echo -e "$(tput setaf 10)\nBuild xmrig-cuda:$(tput sgr0)"
  413. git clone https://github.com/xmrig/xmrig-nvidia.git
  414. cd xmrig-nvidia
  415. mkdir build
  416. cd build
  417. cmake .. -DCMAKE_C_COMPILER=$(which gcc-8) -DCMAKE_CXX_COMPILER=$(which g++-8)
  418. make -j$((`nproc`+1))
  419. fi
  420. echo "Done"
  421. touch /home/wareck/.pass3
  422. fi
  423. sudo chmod -R 775 /home/wareck/miners
  424. }
  425. function configure_ {
  426. if [ ! -f /home/wareck/.pass4 ]
  427. then
  428. echo -e "$(tput setaf 10)\nlxPanel sensors:$(tput sgr0)"
  429. cd /home/wareck
  430. if ! [ -d sensors-lxpanel-plugin ]
  431. then
  432. git clone https://github.com/danamlund/sensors-lxpanel-plugin.git
  433. fi
  434. cd /home/wareck
  435. cd sensors-lxpanel-plugin
  436. make
  437. sudo make install
  438. sudo rm -r /home/wareck/sensors-lxpanel-plugin
  439. echo "Done."
  440. echo -e "$(tput setaf 10)\nConfig files:$(tput sgr0)"
  441. cd /home/wareck/
  442. zip="['firefox.desktop', 'thunderbird.desktop', 'org.remmina.Remmina.desktop', 'filezilla.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop']"
  443. cat <<'EOF'>> zap
  444. #!/bin/bash
  445. gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 32
  446. gsettings set org.gnome.desktop.background picture-uri /home/wareck/Images/mr-robot-wallpapers.jpg
  447. gsettings set org.gnome.shell favorite-apps "XXX"
  448. #su wareck -c 'gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false'
  449. dconf load /org/gnome/terminal/ < /usr/local/bin/zap2
  450. EOF
  451. sed -i "s/XXX/$zip/g" zap
  452. UUID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
  453. cat <<'EOF'>> zap2
  454. [legacy/profiles:/:XXX]
  455. default-size-columns=110
  456. font='Monospace 9'
  457. use-system-font=false
  458. use-theme-colors=false
  459. EOF
  460. sed -i "s/XXX/$UUID/g" zap2
  461. chmod +x zap
  462. sudo cp zap /usr/local/bin
  463. sudo cp zap2 /usr/local/bin
  464. sudo rm zap
  465. sudo rm zap2
  466. sleep 1
  467. sudo rm -r -f /etc/update-motd.d/*
  468. tar xfJ pack1.tar.xz --checkpoint=.10
  469. echo -n -e "\n"
  470. sudo cp /home/wareck/pack2.tar.xz /
  471. sudo cp /home/wareck/pack3.tar.xz /
  472. cd /
  473. sudo tar xfJ pack2.tar.xz --checkpoint=.10
  474. sudo tar xfJ pack3.tar.xz --checkpoint=.10
  475. echo -n -e "\n"
  476. cd /home/wareck
  477. #clear
  478. dynmotd
  479. sudo sed -i -e "s/# set constantshow/set constantshow/g" /etc/nanorc
  480. if ! grep "wareck" /etc/sudoers >/dev/null
  481. then
  482. sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
  483. fi
  484. echo -e "$(tput setaf 10)\nBuild folder and mount drives:$(tput sgr0)"
  485. #if ! [ -r /media/Exos ];then sudo mkdir /media/Exos && cd / & sudo ln -s /media/Exos /Exos ;fi
  486. if ! [ -r /media/Cloud ];then sudo mkdir /media/Cloud && cd / & sudo ln -s /media/Cloud /Cloud ;fi
  487. if ! [ -r /media/Store ];then sudo mkdir /media/Store && cd / & sudo ln -s /media/Store /Store;fi
  488. if ! [ -r /media/Partage ];then sudo mkdir /media/Partage && cd / & sudo ln -s /media/Partage /Partage;fi
  489. if ! [ -r /media/Nas ];then sudo mkdir /media/Nas && cd / & sudo ln -s /media/Nas /Nas;fi
  490. if ! [ -r /media/nvme0 ];then sudo mkdir /media/nvme0 && cd / & sudo ln -s /media/nvme0 /nvme0 ;fi
  491. if ! [ -r /media/nvme1 ];then sudo mkdir /media/nvme1 && cd / & sudo ln -s /media/nvme1 /nvme1 ;fi
  492. if ! [ -r /farm ];then sudo mkdir /farm;fi
  493. if ! [ -r /farm/farm0 ];then sudo mkdir /farm/farm0;fi
  494. if ! [ -r /farm/farm1 ];then sudo mkdir /farm/farm1;fi
  495. if ! [ -r /farm/farm2 ];then sudo mkdir /farm/farm2;fi
  496. if ! [ -r /farm/farm3 ];then sudo mkdir /farm/farm3;fi
  497. if ! [ -r /farm/farm4 ];then sudo mkdir /farm/farm4;fi
  498. if ! grep "UUID=1df72b63-fca0-45c6-992c-3e2532d5591a /media/Store ext4" /etc/fstab >/dev/null
  499. then
  500. cp /etc/fstab /tmp/fstab
  501. cat <<"EOF">> /tmp/fstab
  502. #ext4
  503. UUID=6fc06d70-1a38-4706-ae83-0a329181b9f7 /media/Cloud ext4 auto,nofail,noatime,rw,user 0 0
  504. UUID=a111c12b-d1b4-441a-9352-b6bbc558184e /media/Partage ext4 auto,nofail,noatime,rw,user 0 0
  505. UUID=1df72b63-fca0-45c6-992c-3e2532d5591a /media/Store ext4 auto,nofail,noatime,rw,user 0 0
  506. #btrfs temporary drives
  507. #UUID=98f4077f-36da-42de-b322-8c58aec550a7 /nvme0 btrfs ssd,nodatasum,nobarrier,nodatacow,discard=async,noatime
  508. #UUID=1181ac83-b8c5-404a-97fa-b23ceb1addc5 /nvme1 btrfs ssd,nodatasum,nobarrier,nodatacow,discard=async,noatime
  509. /dev/md0 /raid btrfs auto,nofail,noatime,nodiratime,rw,user 0 0
  510. #/dev/plant/fast /nvme0 btrfs ssd,nodatasum,nobarrier,nodatacow,discard=async,noatime
  511. #Chia drive
  512. UUID=77a593df-1bdb-4012-8c9e-ce50864b464d /farm/farm0 ext4 auto,nofail,noatime,nodiratime,rw,user 0 0
  513. UUID=0d145a5a-50b0-456c-8998-549def2f9fc9 /farm/farm1 ext4 auto,nofail,noatime,nodiratime,rw,user 0 0
  514. UUID=b99c7fa3-827c-4c09-a625-a72aec6c9395 /farm/farm2 ext4 auto,nofail,noatime,nodiratime,rw,user 0 0
  515. UUID=e583a1e4-f8c8-4c2b-a427-cee854e0b56d /farm/farm3 ext4 auto,nofail,noatime,nodiratime,rw,user 0 0
  516. UUID=d24c7616-91c2-434c-b21e-8dd70d794e25 /farm/farm4 ext4 auto,nofail,noatime,nodiratime,rw,user 0 0
  517. EOF
  518. sudo cp /tmp/fstab /etc/fstab
  519. fi
  520. sudo rm /etc/hosts
  521. sudo cat <<'EOF'>> /etc/hosts
  522. 127.0.0.1 localhost
  523. 127.0.1.1 cube
  524. 192.168.1.8 miniserver miniserver gogserver.dnsalias.com
  525. 192.168.1.10 nzxt
  526. 192.168.1.11 garage
  527. 192.168.1.12 blade
  528. 192.168.1.254 mafreebox.freebox.fr
  529. 192.168.1.200 node
  530. # The following lines are desirable for IPv6 capable hosts
  531. ::1 ip6-localhost ip6-loopback
  532. fe00::0 ip6-localnet
  533. ff00::0 ip6-mcastprefix
  534. ff02::1 ip6-allnodes
  535. ff02::2 ip6-allrouters
  536. EOF
  537. echo "Done."
  538. echo -e "$(tput setaf 10)\nSensors drivers:$(tput sgr0)"
  539. if ! grep "it87" /etc/modules >/dev/null
  540. then
  541. cp /etc/modules /tmp/modules
  542. cat <<"EOF">> /tmp/modules
  543. # Chip drivers
  544. it87
  545. EOF
  546. sudo cp /tmp/modules /etc/modules
  547. fi
  548. if [ -f /tmp/sensors3.conf ]
  549. then
  550. chmod 777 /tmp/sensors3.conf
  551. rm /tmp/sensors3.conf
  552. fi
  553. cat <<'EOF'>> /tmp/sensors3.conf
  554. chip "it8728-isa-0228"
  555. label in0 "Vcore"
  556. label in1 "Vdram" # "DDR3" in BIOS
  557. label in2 "+3.3V"
  558. label in3 "+5V" # Not in BIOS
  559. label in4 "+12V"
  560. ignore in5 # -12V unused
  561. ignore in6
  562. label in7 "5VSB" # Not in BIOS
  563. label in8 "Vbat" # Not in BIOS
  564. compute in3 @ * (6.8/10+1), @ / (6.8/10+1)
  565. compute in4 @ * 3.963, @ / 3.963
  566. compute in7 @ * (6.8/10+1), @ / (6.8/10+1)
  567. set in0_min 0.825 * 0.95
  568. set in0_max 1.425 * 1.05
  569. set in1_min 1.5 * 0.95
  570. set in1_max 1.5 * 1.05
  571. set in2_min 3.3 * 0.95
  572. set in2_max 3.3 * 1.05
  573. set in3_min 5 * 0.95
  574. set in3_max 5 * 1.05
  575. set in4_min 12 * 0.95
  576. set in4_max 12 * 1.05
  577. set in7_min 5 * 0.95
  578. set in7_max 5 * 1.05
  579. ignore cpu0_vid
  580. set fan4_min 100
  581. set fan1_min 100
  582. ignore fan2
  583. ignore fan3
  584. ignore fan5
  585. ignore in8
  586. ignore intrusion0
  587. label fan1 "fan1"
  588. label fan4 "fan2"
  589. label temp1 "MB"
  590. label temp2 "CPU"
  591. set temp2_min 0
  592. set temp2_max 75
  593. set temp1_min 0
  594. set temp1_max 90
  595. set temp1_beep 0.0
  596. label temp1 "VRM Temp"
  597. set temp1_min 0
  598. set temp1_max 65
  599. label temp2 "SB Temp"
  600. label temp3 "CPU Temp"
  601. set temp3_min 0
  602. set temp3_max 65
  603. chip "nvme-pci-0400"
  604. set temp2_max 75
  605. set temp2_min 20
  606. set temp3_max 75
  607. set temp3_min 20
  608. EOF
  609. chmod 644 /tmp/sensors3.conf
  610. sudo cp /tmp/sensors3.conf /etc/
  611. sudo sensors -s
  612. sensors
  613. sudo apt install ethtool -y
  614. iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{print $2a;getline}')
  615. sudo ethtool --change $iface wol g
  616. cat <<'EOF'>> /tmp/wakemeup.sh
  617. #!/bin/bash
  618. set -e
  619. if ! [ -x "$(command -v etherwake)" ];then sudo apt-get install etherwake -y;fi
  620. clear
  621. echo -e "$(tput setaf 10)Wake On Lan v1.0:$(tput sgr0)"
  622. PS3="Select : "
  623. items=("Nzxt" "Garage" "Blade")
  624. select item in "${items[@]}" Quit
  625. do
  626. case $REPLY in
  627. 1) sudo etherwake -i enp5s0 E0:D5:5E:2D:9E:CB ; break;;
  628. 2) sudo etherwake -i enp5s0 58:11:22:CD:FC:7A ; break;;
  629. 3) sudo etherwake -i enp5s0 78:AC:44:57:3C:50 ; break;;
  630. $((${#items[@]}+1))) echo "We're done!"; break 2;;
  631. *) echo "Ooops - unknown choice $REPLY"; break;
  632. esac
  633. done
  634. echo -e ""
  635. EOF
  636. sudo chmod +x /tmp/wakemeup.sh
  637. sudo cp /tmp/wakemeup.sh /usr/local/bin
  638. echo "Done."
  639. echo -e "$(tput setaf 10)\nVnc init:$(tput sgr0)"
  640. sudo update-rc.d vncserver defaults
  641. echo "Done."
  642. echo -e "$(tput setaf 10)\nOpening ports:$(tput sgr0)"
  643. sudo ufw allow 8333 >/dev/null
  644. sudo ufw allow 22 >/dev/null
  645. sudo ufw allow 5900 >/dev/null
  646. sudo ufw allow 10000 >/dev/null
  647. sudo ufw allow 139 >/dev/null
  648. sudo ufw allow 5901 >/dev/null
  649. sudo ufw allow 5902 >/dev/null
  650. sudo ufw allow 445 >/dev/null
  651. echo "Done."
  652. echo -e "$(tput setaf 10)\nBashrc mod:$(tput sgr0)"
  653. if [ $Cuda = "YES" ]
  654. then
  655. if ! grep "#mod for cuda" /home/wareck/.bashrc >/dev/null
  656. then
  657. echo '#mod for cuda' >>/home/wareck/.bashrc
  658. echo 'export PATH=/usr/local/cuda-12.3/bin/:$PATH'>>/home/wareck/.bashrc
  659. echo 'export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64:$LD_LIBRARY_PATH'>>/home/wareck/.bashrc
  660. echo '' >>/home/wareck/.bashrc
  661. fi
  662. fi
  663. if ! grep "#mod for tightvncserver" /home/wareck/.bashrc >/dev/null
  664. then
  665. echo '#mod for tightvncserver' >>/home/wareck/.bashrc
  666. echo 'cd ~' >>/home/wareck/.bashrc
  667. fi
  668. echo "Done."
  669. echo -e "$(tput setaf 10)\nDisable IPv6:$(tput sgr0)"
  670. if ! grep "ipv6.disable=1" /etc/default/grub >/dev/null
  671. then
  672. sed -i -e "s/quiet splash/quiet splash ipv6.disable=1/g" /etc/default/grub
  673. sed -i -e "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"ipv6.disable=1 acpi_enforce_resources=lax/g" /etc/default/grub
  674. sudo update-grub2
  675. fi
  676. sudo chown -R wareck:wareck /home/wareck/miners/xmr*
  677. sudo chown -R wareck:wareck /home/wareck/miners/cgminer*
  678. sudo apt-get remove light-locker* -y
  679. if [ ! -d /home/wareck/.config/lxpanel/LXDE/panels ]
  680. then
  681. mkdir /home/wareck/.config/lxpanel
  682. mkdir /home/wareck/.config/lxpanel/LXDE
  683. mkdir /home/wareck/.config/lxpanel/LXDE/panels
  684. fi
  685. sudo cp /home/wareck/Build_Cube/pack/panel /home/wareck/.config/lxpanel/LXDE/panels/panel
  686. sudo chmod 777 /home/wareck/.config/lxpanel/LXDE/panels/panel
  687. if [ ! -d /home/wareck/.config/lxterminal ]
  688. then
  689. mkdir /home/wareck/.config/lxterminal
  690. fi
  691. sudo cp /home/wareck/Build_Cube/pack/lxterminal.conf /home/wareck/.config/lxterminal/
  692. sudo chmod 777 /home/wareck/.config/lxterminal/lxterminal.conf
  693. echo "Done."
  694. touch /home/wareck/.pass4
  695. decompte_
  696. fi
  697. }
  698. function printer_ {
  699. if [ ! -f /home/wareck/.pass3 ]
  700. then
  701. if [ ! -d /usr/local/share/foomatic/ ]
  702. then
  703. if [ ! -d /tmp/foomatic-db/ ]
  704. then
  705. cd /tmp/
  706. echo -e "$(tput setaf 10)\nInstall printers generic drivers:$(tput sgr0)"
  707. git clone https://github.com/OpenPrinting/foomatic-db.git
  708. fi
  709. cd /tmp/foomatic-db
  710. if [ ! -d /usr/local/share/foomatic/ ]
  711. then
  712. ./make_configure
  713. ./configure
  714. sudo make install
  715. echo "Done."
  716. fi
  717. fi
  718. fi
  719. }
  720. function mounting_drives_ {
  721. if [ ! -f /home/wareck/.pass4 ]
  722. then
  723. echo -e "$(tput setaf 10)\nMounting Drives$(tput sgr0)"
  724. if ! findmnt /media/Partage >/dev/null ; then sudo mount /media/Partage ;fi
  725. if ! findmnt /media/Store >/dev/null ; then sudo mount /media/Store ;fi
  726. if ! findmnt /media/Cloud >/dev/null ; then sudo mount /media/Cloud ;fi
  727. sudo chmod 777 /media/Store
  728. sudo chmod 777 /media/Cloud
  729. sudo chmod 777 /media/Partage
  730. sudo chmod 777 /media/nvme0
  731. sudo chmod 777 /media/nvme1
  732. sudo chmod 777 /media/Nas
  733. echo "Done."
  734. fi
  735. }
  736. function cleaning_ {
  737. if [ -f /home/wareck/.pass4 ]
  738. then
  739. echo -e "$(tput setaf 10)\nCleaning install files:$(tput sgr0)"
  740. if [ -f /pack2.tar.xz ]; then sudo rm /pack2.tar.xz ;fi
  741. if [ -f /pack3.tar.xz ]; then sudo rm /pack3.tar.xz ;fi
  742. if [ -f /home/wareck/pack1.tar.xz ]; then rm /home/wareck/pack1.tar.xz ;fi
  743. if [ -f /home/wareck/pack2.tar.xz ]; then rm /home/wareck/pack2.tar.xz ;fi
  744. if [ -f /home/wareck/pack3.tar.xz ]; then rm /home/wareck/pack3.tar.xz ;fi
  745. if [ -f /home/wareck/xmrig.tar.xz ]; then rm /home/wareck/xmrig.tar.xz ;fi
  746. if [ -f /home/wareck/gpu-miners.tar.xz ]; then rm /home/wareck/gpu-miners.tar.xz;fi
  747. if [ -r /home/wareck/Music ]; then sudo rm -r -f /home/wareck/Music ;fi
  748. if [ -r /home/wareck/Public ]; then sudo rm -r -f /home/wareck/Public ;fi
  749. if [ -r /home/wareck/Templates ]; then sudo rm -r -f /home/wareck/Templates ;fi
  750. if [ -r /home/wareck/Vidéos ]; then sudo rm -r -f /home/wareck/Vidéos ;fi
  751. if [ -f /home/wareck/NVIDIA-Linux-x86_64-470.74.run ]; then rm /home/wareck/NVIDIA-Linux-x86_64-470.74.run ;fi
  752. if [ -f /home/wareck/NVIDIA-Linux-x86_64-470.82.00.run ]; then rm /home/wareck/NVIDIA-Linux-x86_64-470.82.00.run ;fi
  753. if [ -f /home/wareck/.pass1 ]; then rm /home/wareck/.pass1 ;fi
  754. if [ -f /home/wareck/.pass2 ]; then rm /home/wareck/.pass2 ;fi
  755. if [ -f /home/wareck/.pass3 ]; then rm /home/wareck/.pass3 ;fi
  756. if [ -f /home/wareck/.pass4 ]; then rm /home/wareck/.pass4 ;fi
  757. if [ -f /usr/local/bin/zap ]; then sudo rm /usr/local/bin/zap* ;fi
  758. if [ -f /home/wareck/.config/autostart/install_os.desktop ];then sudo rm /home/wareck/.config/autostart/install_os.desktop;fi
  759. if [ -f /home/wareck/.config/autostart/zappy.desktop ];then sudo rm /home/wareck/.config/autostart/zappy.desktop;fi
  760. if [ -r /lib/modules/5.15.0-60-generic ]; then sudo rm -r /lib/modules/5.15.0-60-generic ;fi
  761. if [ -r /lib/modules/5.15.0-46-generic ]; then sudo rm -r /lib/modules/5.15.0-46-generic ;fi
  762. if [ -r /lib/modules/5.15.0-70-generic ]; then sudo rm -r /lib/modules/5.15.0-70-generic ;fi
  763. cd /home/wareck/Build_Cube/pack
  764. sudo chown -R wareck:wareck /home/wareck/miners
  765. sudo chmod -R 775 /home/wareck/miners
  766. ./clean.sh
  767. echo -e "Done. \n"
  768. echo `date` "install/update" >/home/wareck/.buildcube
  769. fi
  770. sudo apt-get autoremove -y
  771. sleep 1
  772. }
  773. function autoroot_ {
  774. if [ ! -d /home/wareck/.config/autostart ]
  775. then
  776. echo -e "$(tput setaf 10)\nInit install & autostart:$(tput sgr0)"
  777. mkdir /home/wareck/.config/autostart
  778. echo -e "Done."
  779. sleep 1
  780. fi
  781. if [ ! -f /home/wareck/.config/autostart/install_os.desktop ]
  782. then
  783. cat <<'EOF'>> /home/wareck/.config/autostart/install_os.desktop
  784. [Desktop Entry]
  785. # VERSION=3.36.2
  786. Name=Terminal
  787. Comment=Use the command line
  788. Keywords=shell;prompt;command;commandline;cmd;
  789. TryExec=gnome-terminal
  790. Exec=gnome-terminal -- bash -c "sudo /home/wareck/Build_Cube/build_cube.sh; exec bash"
  791. Icon=org.gnome.Terminal
  792. Type=Application
  793. Categories=GNOME;GTK;System;TerminalEmulator;
  794. StartupNotify=true
  795. X-GNOME-SingleWindow=false
  796. OnlyShowIn=GNOME;Unity;
  797. Actions=new-window;preferences;
  798. X-Ubuntu-Gettext-Domain=gnome-terminal
  799. [Desktop Action new-window]
  800. Name=New Window
  801. Exec=gnome-terminal --window
  802. [Desktop Action preferences]
  803. Name=Preferences
  804. Exec=gnome-terminal --preferences
  805. EOF
  806. chmod +x /home/wareck/.config/autostart/install_os.desktop
  807. fi
  808. if [ ! -f /home/wareck/.config/autostart/zappy.desktop ]
  809. then
  810. cat <<'EOF'>> /home/wareck/.config/autostart/zappy.desktop
  811. [Desktop Entry]
  812. # VERSION=3.36.2
  813. Name=Terminal
  814. Comment=Use the command line
  815. Keywords=shell;prompt;command;commandline;cmd;
  816. TryExec=gnome-terminal
  817. Exec=gnome-terminal -- bash -c "/usr/local/bin/zap"
  818. Icon=org.gnome.Terminal
  819. Type=Application
  820. Categories=GNOME;GTK;System;TerminalEmulator;
  821. StartupNotify=true
  822. X-GNOME-SingleWindow=false
  823. OnlyShowIn=GNOME;Unity;
  824. Actions=new-window;preferences;
  825. X-Ubuntu-Gettext-Domain=gnome-terminal
  826. [Desktop Action new-window]
  827. Name=New Window
  828. Exec=gnome-terminal --window
  829. [Desktop Action preferences]
  830. Name=Preferences
  831. Exec=gnome-terminal --preferences
  832. EOF
  833. chmod +x /home/wareck/.config/autostart/zappy.desktop
  834. fi
  835. if ! grep "wareck" /etc/sudoers >/dev/null
  836. then
  837. sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
  838. fi
  839. echo -e "$(tput setaf 10)\nUpdate and install packages:$(tput sgr0)"
  840. sudo apt-get update
  841. sudo apt-get install lxde lxde-icon-theme -y
  842. sleep 1
  843. }
  844. function remove_screensaver {
  845. #remove screensaver
  846. cat <<EOF>> autostart
  847. @lxpanel --profile LXDE
  848. @pcmanfm --desktop --profile LXDE
  849. EOF
  850. sudo chmod 744 autostart
  851. sudo cp autostart /etc/xdg/lxsession/LXDE/
  852. sudo cp autostart /home/wareck/.config/lxsession/LXDE/
  853. sudo rm autostart
  854. sudo apt-get remove xscreensaver xscreensaver-data -y
  855. }
  856. function cmake_ {
  857. pids=""
  858. /home/wareck/Build_Cube/options/tools/_cmake.sh rollback & pids="$pids $!"
  859. wait $pids
  860. sudo ldconfig
  861. }
  862. function watchdog_ {
  863. pids=""
  864. /home/wareck/Build_Cube/options/watchdog.sh ext & pids="$pids $!"
  865. wait $pids
  866. }
  867. function wol_ {
  868. iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{print $2a;getline}')
  869. ether=$(which ethtool)
  870. echo "[Unit]" >>/tmp/wol.service
  871. echo "Description=Enable Wake On Lan" >>/tmp/wol.service
  872. echo "" >>/tmp/wol.service
  873. echo "[Service]" >>/tmp/wol.service
  874. echo "Type=oneshot" >>/tmp/wol.service
  875. echo "ExecStart = $ether --change$iface wol g" >>/tmp/wol.service
  876. echo "" >>/tmp/wol.service
  877. echo "[Install]" >>/tmp/wol.service
  878. echo "WantedBy=basic.target" >>/tmp/wol.service
  879. sudo cp /tmp/wol.service /etc/systemd/system/wol.service
  880. sudo systemctl daemon-reload
  881. sudo systemctl enable wol.service
  882. sudo systemctl start wol.service
  883. }
  884. intro_
  885. watchdog_
  886. autoroot_
  887. ubuntu_version_check
  888. update_
  889. kernel_check_
  890. autoroot_
  891. nvidia_driver_
  892. update_
  893. download_packs_
  894. printer_
  895. build_miners_
  896. configure_
  897. mounting_drives_
  898. cleaning_
  899. remove_screensaver
  900. clear
  901. wol_
  902. dynmotd
  903. echo -e "$(tput setaf 10)\nEnd of script:$(tput sgr0) \n"
  904. echo -e "$(tput setaf 7)Need to install webmin manually (reboot required)$(tput sgr0)"
  905. echo -e "$(tput setaf 7)after install webmin, reboot is required $(tput sgr0)"
  906. echo -e ""