build_cube.sh 30 KB

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