summaryrefslogtreecommitdiff
path: root/init/waagent
diff options
context:
space:
mode:
Diffstat (limited to 'init/waagent')
-rwxr-xr-xinit/waagent57
1 files changed, 57 insertions, 0 deletions
diff --git a/init/waagent b/init/waagent
new file mode 100755
index 0000000..fe30d4d
--- /dev/null
+++ b/init/waagent
@@ -0,0 +1,57 @@
+#!/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