Files
WALinuxAgent/init/waagent
2015-06-30 16:24:24 +08:00

58 lines
830 B
Bash
Executable File

#!/bin/bash
#
# Init file for AzureLinuxAgent.
#
# chkconfig: 2345 60 80
# description: AzureLinuxAgent
#
# source function library
. /etc/rc.d/init.d/functions
RETVAL=0
FriendlyName="AzureLinuxAgent"
WAZD_BIN=/usr/sbin/waagent
start()
{
echo -n $"Starting $FriendlyName: "
$WAZD_BIN -start
RETVAL=$?
echo
return $RETVAL
}
stop()
{
echo -n $"Stopping $FriendlyName: "
killproc -p /var/run/waagent.pid $WAZD_BIN
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
;;
report)
;;
status)
status $WAZD_BIN
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
RETVAL=1
esac
exit $RETVAL