How to implement one-click installation script in ceph-dash
This article mainly introduces ceph-dash how to achieve one-click installation script, the article is very detailed, has a certain reference value, interested friends must read it!
Start_dash.shtar-zxvf. / ceph-dash.tar.gzcd ceph-dashperl start.pl stop_dash.shvalue= `ps-ef | grep "python. / ceph-dash.py" | awk'{print $2}'| head-1`echo $valuekill-9$ value&KillThread (); my $Usee = system ("whoami"); if ($User! = "root") {die "This script must be run in root\ n";} print "you are root\ n"; # switch directory chdir ("Jinja2-2.7.3") My $command=system ("sudo python setup.py install"); if (0! = $command) {die "install Jinja2 failture\ n";} print "\ nJinja2 Install complete\ n"; chdir (".."); $command=system ("chmod axix. / * py"); unless (0 = = $command) {die "chmod py failture\ n";} $command=system (". / ceph-dash.py &"); print ("\ nbread *\ n") Print ("\ nceph dash set up successful\ n"); print ("\ nkilling *\ n"); # Kill process sub KillThread {# my $RumCmd = system ("ps-ef | grep * dash.py"); my $RumCmd = `ps-ef | grep dash.py`; print $RumCmd; my @ Content = split'\ nKill RumCmd Foreach my $value (@ Content) {if ($value = ~ m/ceph-dash.py/ | | $value = ~ m/ceph_dash.py/) {my @ Array = split'\ s examples; my $Num = $Array [1]; print "\ nThread ID is $Num\ n"; system ("kill-9$ Num"); break } above is all the content of the article "how to implement one-click installation script for ceph-dash". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!