#!/bin/bash

# used for cli command "request system reboot"
# no input and output var

shutdown -kr 0 >/dev/null

#ps -ef|grep "login -h"|grep -v grep|awk '{print $2}'|xargs kill -9 >/dev/null 2>&1
#/etc/init.d/xinetd stop >/dev/null 2>&1

#ps -ef|grep "sshd:"|grep -v grep|awk '{print $2}'|xargs kill -9 >/dev/null 2>&1
#/etc/init.d/ssh stop >/dev/null 2>&1

pidof sshd|xargs kill -9 >/dev/null 2>&1

sync && reboot

exit 0
