summaryrefslogtreecommitdiff
path: root/init/ubuntu
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2015-08-14 16:40:41 -0600
committerusd-importer <ubuntu-server@lists.ubuntu.com>2015-08-15 14:33:21 +0000
commitf78b9650d0e7b008d430673a075aad95dda863be (patch)
treea6749619e78483d45a66d4bad4d6e922391541fc /init/ubuntu
parent0afc048f2a6ff3638ecfa33e7ded5dc8dddf041a (diff)
downloadvyos-walinuxagent-f78b9650d0e7b008d430673a075aad95dda863be.tar.gz
vyos-walinuxagent-f78b9650d0e7b008d430673a075aad95dda863be.zip
Import patches-unapplied version 2.1.1-0ubuntu1 to ubuntu/wily-proposed
Imported using git-ubuntu import. Changelog parent: 0afc048f2a6ff3638ecfa33e7ded5dc8dddf041a New changelog entries: * New upstream release for Ubuntu. - Switch to Python3 - Applies Ubuntu specific patches
Diffstat (limited to 'init/ubuntu')
-rw-r--r--init/ubuntu/walinuxagent2
-rw-r--r--init/ubuntu/walinuxagent.conf26
-rwxr-xr-xinit/ubuntu/walinuxagent.service15
3 files changed, 43 insertions, 0 deletions
diff --git a/init/ubuntu/walinuxagent b/init/ubuntu/walinuxagent
new file mode 100644
index 0000000..a17174c
--- /dev/null
+++ b/init/ubuntu/walinuxagent
@@ -0,0 +1,2 @@
+# To disable the Windows Azure Agent, set WALINUXAGENT_ENABLED=0
+WALINUXAGENT_ENABLED=1
diff --git a/init/ubuntu/walinuxagent.conf b/init/ubuntu/walinuxagent.conf
new file mode 100644
index 0000000..2ce6608
--- /dev/null
+++ b/init/ubuntu/walinuxagent.conf
@@ -0,0 +1,26 @@
+description "Windows Azure Linux agent"
+author "Ben Howard <ben.howard@canonical.com>"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+pre-start script
+
+ [ -r /etc/default/walinuxagent ] && . /etc/default/walinuxagent
+
+ if [ "$WALINUXAGENT_ENABLED" != "1" ]; then
+ stop ; exit 0
+ fi
+
+ if [ ! -x /usr/sbin/waagent ]; then
+ stop ; exit 0
+ fi
+
+ #Load the udf module
+ modprobe -b udf
+
+end script
+
+exec /usr/sbin/waagent -daemon
+
+respawn
diff --git a/init/ubuntu/walinuxagent.service b/init/ubuntu/walinuxagent.service
new file mode 100755
index 0000000..1a67835
--- /dev/null
+++ b/init/ubuntu/walinuxagent.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Azure Linux Agent
+After=network.target
+After=sshd.service
+ConditionFileIsExecutable=/usr/sbin/waagent
+ConditionPathExists=/etc/waagent.conf
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/python3 /usr/sbin/waagent -daemon
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+