def systemctl_autostart(self, service_name, start_cmd, stop_cmd):
<EOL>service_content = bigdata_conf.systemctl_config.format(<EOL>service_name=service_name,<EOL>start_cmd=start_cmd,<EOL>stop_cmd=stop_cmd<EOL>)<EOL>with cd('<STR_LIT>'):<EOL><INDENT>if not exists(service_name):<EOL><INDENT>sudo('<STR_LIT>'.format(service_name))<EOL><DEDENT>put(StringIO(service_content), service_name, use_sudo=True)<EOL><DEDENT>sudo('<STR_LIT>')<EOL>sudo('<STR_LIT>'.format(service_name))<EOL>sudo('<STR_LIT>'.format(service_name))<EOL>sudo('<STR_LIT>'.format(service_name))<EOL>sudo('<STR_LIT>'.format(service_name))<EOL>
ubuntu 16.04 systemctl service config
:param service_name:
:param start_cmd:
:param stop_cmd:
:return: