mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-31 02:37:56 +00:00 
			
		
		
		
	Adding system reload command.
This commit is contained in:
		| @@ -268,6 +268,23 @@ testlogout() { | ||||
|     listusers | ||||
| } | ||||
|  | ||||
| getsubsystemnames() { | ||||
|     payload="{ \"command\" : \"getsubsystemnames\" }" | ||||
|             curl  ${FLAGS} -X POST "https://${OWSEC}/api/v1/system" \ | ||||
|             -H  "accept: application/json" \ | ||||
|             -H "Authorization: Bearer ${token}" \ | ||||
|             -d "$payload" | ||||
| } | ||||
|  | ||||
| reloadsubsystem() { | ||||
|     payload="{ \"command\" : \"reload\", \"subsystems\" : [ \"OUIServer\" , \"CommandManager\" ] }" | ||||
|             curl  ${FLAGS} -X POST "https://${OWSEC}/api/v1/system" \ | ||||
|             -H  "accept: application/json" \ | ||||
|             -H "Authorization: Bearer ${token}" \ | ||||
|             -d "$payload" | ||||
| } | ||||
|  | ||||
|  | ||||
| shopt -s nocasematch | ||||
|  | ||||
| case "$1" in | ||||
| @@ -288,6 +305,8 @@ case "$1" in | ||||
|     "systeminfo") login; systeminfo ; logout;; | ||||
|     "sendemail") login; sendemail ; logout;; | ||||
|     "testlogout") login; testlogout ;; | ||||
|     "getsubsystemnames") login; getsubsystemnames; logout ;; | ||||
|     "reloadsubsystem") login; reloadsubsystem; logout ;; | ||||
|     "help") login; help  ; logout ;; | ||||
|     *) help ;; | ||||
| esac | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959