Updating init script installation details

This commit is contained in:
Matthew Jones 2014-07-31 10:39:59 -04:00
parent b8cd4d063e
commit 27c44ac5d8
2 changed files with 19 additions and 5 deletions

View File

@ -13,7 +13,6 @@ from awx import __version__
build_timestamp = os.getenv("BUILD",datetime.datetime.now().strftime('-%Y%m%d%H%M'))
# Paths we'll use later
sysinit = "/etc/init.d"
etcpath = "/etc/awx"
homedir = "/var/lib/awx"
sharedir = "/usr/share/awx"
@ -21,9 +20,11 @@ munin_plugin_path = "/etc/munin/plugins/"
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
if os.path.exists("/etc/debian_version"):
sysinit = "/etc/init.d"
webconfig = "/etc/apache2/conf.d"
shutil.copy("config/awx-munin-ubuntu.conf", "config/awx-munin.conf")
else:
sysinit = "/etc/rc.d/init.d"
webconfig = "/etc/httpd/conf.d"
shutil.copy("config/awx-munin-el.conf", "config/awx-munin.conf")

View File

@ -1,8 +1,21 @@
#!/bin/bash
#
# ansible-tower
#
# chkconfig: - 20 80
# description: support init to manage tower and its related services
# init script to manage tower and its related services
# Copyright (c) 2014 Ansible, Inc.
# All Rights Reserved
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: support init to manage tower and its related services
# Description: Ansible Tower provides an easy-to-use UI and dashboard, role-based access control and more for your Ansible initiative
### END INIT INFO
if [ -e /etc/debian_version ]
then
@ -36,5 +49,5 @@ case "$1" in
service_action status
;;
*)
echo "Usage: $0 {start|stop|restart}"
echo "Usage: $0 {start|stop|restart|status}"
esac