Subversion Repositories php-qbpwcf

Rev

Rev 130 | Rev 145 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 130 Rev 131
Line 355... Line 355...
355
 
355
 
356
	#結束執行,回傳 shell 1
356
	#結束執行,回傳 shell 1
357
	exit(1);
357
	exit(1);
358
 
358
 
359
	}#if end
359
	}#if end
-
 
360
 
-
 
361
#path of bin for systemctl 
-
 
362
$pathOfBinForSystemctl="/var/qbpwcf/bin_for_systemctl/";
360
	
363
 
-
 
364
#service path
-
 
365
$servicePath=$pathOfBinForSystemctl.$serviceName.".sh";
-
 
366
 
361
#移動程式到 /usr/bin/ 底下
367
#移動程式到 /var/qbpwcf/bin_for_systemctl/ 底下
362
#函式說明:
368
#函式說明:
363
#移動檔案
369
#移動檔案
364
#回傳結果:
370
#回傳結果:
365
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
371
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
366
#$result["function"],當前執行的函數名稱
372
#$result["function"],當前執行的函數名稱
Line 368... Line 374...
368
#$result["content"],檔案輸出後的位置與名稱.
374
#$result["content"],檔案輸出後的位置與名稱.
369
#必填參數:
375
#必填參數:
370
#$conf["from"],字串,要移動的檔案名稱與位置.
376
#$conf["from"],字串,要移動的檔案名稱與位置.
371
$conf["from"]=$createTempFile["content"];
377
$conf["from"]=$createTempFile["content"];
372
#$conf["to"],字串,要移動到的位置與名稱
378
#$conf["to"],字串,要移動到的位置與名稱
373
$conf["to"]="/usr/bin/".$serviceName.".sh";
379
$conf["to"]=$servicePath;
374
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
380
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
375
$conf["fileArgu"]=__FILE__;
381
$conf["fileArgu"]=__FILE__;
376
#可省略參數:
382
#可省略參數:
377
#$conf["commentsArray"],字串陣列,提示的文字描述,$conf["commentsArray"][$i]代表第($+1)行的描述.
383
#$conf["commentsArray"],字串陣列,提示的文字描述,$conf["commentsArray"][$i]代表第($+1)行的描述.
378
#$conf["commentsArray"]=array("");
384
#$conf["commentsArray"]=array("");
Line 406... Line 412...
406
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
412
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
407
$conf["fileArgu"]=__FILE__;
413
$conf["fileArgu"]=__FILE__;
408
#$conf["name"],字串,服務名稱,實際產生的system名稱會加上".service".
414
#$conf["name"],字串,服務名稱,實際產生的system名稱會加上".service".
409
$conf["name"]=$serviceName;
415
$conf["name"]=$serviceName;
410
#$conf["cmd"],字串,要執行的指令.
416
#$conf["cmd"],字串,要執行的指令.
411
$conf["cmd"]=$serviceName.".sh";
417
$conf["cmd"]=$servicePath;
412
#可省略參數:
418
#可省略參數:
413
#$conf["params"],字串陣列,指令要使用的參數.
419
#$conf["params"],字串陣列,指令要使用的參數.
414
#$conf["params"]=array("");
420
#$conf["params"]=array("");
415
#$conf["enable"],字串,預設為"true",代表該服務為enable.
421
#$conf["enable"],字串,預設為"true",代表該服務為enable.
416
$conf["enable"]=$runOnBoot;
422
$conf["enable"]=$runOnBoot;