How to run a service on vm when its bootstapped from cloud init
0 down vote favorite
I am trying to run zabbix agent when my vm comes up
my cloudinit.txt (part of it) loks like this :-
runcmd:
- [ ls, -l, / ]
- [ ls, -l, /usr ]
- [ sudo service zabbix-agent restart ]
most of the commands work ( I am able to list the directory) but the service does not start and i get this in logs:-
sudo service zabbix-agent restart: command not found
If I log into ,y vm ..i am able to start it using the same command