mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-08-28 13:25:53 +00:00
58 lines
830 B
Bash
Executable File
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
|