summaryrefslogtreecommitdiffstats
path: root/smartproxy
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2014-05-06 15:52:11 -0400
committerMartin Kosek <mkosek@redhat.com>2014-05-13 13:12:15 +0200
commit74412dbf88f78b19a54c35e326e173f5344922d0 (patch)
tree7df8d57cb007442da485698516643f9dae61acaf /smartproxy
parent6d618853a4d519c8671e2e38f1aaa290a6d62b83 (diff)
downloadfreeipa-74412dbf88f78b19a54c35e326e173f5344922d0.tar.gz
freeipa-74412dbf88f78b19a54c35e326e173f5344922d0.tar.xz
freeipa-74412dbf88f78b19a54c35e326e173f5344922d0.zip
Clean up Smartproxy support, drop unused code
Drop the logrotate file because Apache manages the logs Drop the systemd configuration because we run in Apache Import json_encode_binary from ipalib Fix Requires Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
Diffstat (limited to 'smartproxy')
-rw-r--r--smartproxy/Makefile.am8
-rw-r--r--smartproxy/configure.ac2
-rw-r--r--smartproxy/ipa-smartproxy.logrotate11
-rw-r--r--smartproxy/ipa-smartproxy.py6
-rw-r--r--smartproxy/ipa-smartproxy.service12
5 files changed, 2 insertions, 37 deletions
diff --git a/smartproxy/Makefile.am b/smartproxy/Makefile.am
index f79aecfc3..c0994cc37 100644
--- a/smartproxy/Makefile.am
+++ b/smartproxy/Makefile.am
@@ -14,11 +14,6 @@ app_DATA = \
ipa-smartproxy.py \
$(NULL)
-rotatedir = $(LOGROTATE_DIR)
-rotate_DATA = \
- ipa-smartproxy.logrotate \
- $(NULL)
-
SUBDIRS = \
man \
$(NULL)
@@ -40,6 +35,3 @@ MAINTAINERCLEANFILES = \
missing \
Makefile.in \
$(NULL)
-
-install-data-hook:
- mv $(DESTDIR)/$(LOGROTATE_DIR)/ipa-smartproxy.logrotate $(DESTDIR)/$(LOGROTATE_DIR)/ipa-smartproxy
diff --git a/smartproxy/configure.ac b/smartproxy/configure.ac
index 5908a7f13..76e208cf4 100644
--- a/smartproxy/configure.ac
+++ b/smartproxy/configure.ac
@@ -60,10 +60,8 @@ dnl ---------------------------------------------------------------------------
IPA_DATA_DIR="$datadir/ipa"
IPA_SYSCONF_DIR="$sysconfdir/ipa"
-LOGROTATE_DIR="$sysconfdir/logrotate.d"
AC_SUBST(IPA_DATA_DIR)
AC_SUBST(IPA_SYSCONF_DIR)
-AC_SUBST(LOGROTATE_DIR)
# Files
diff --git a/smartproxy/ipa-smartproxy.logrotate b/smartproxy/ipa-smartproxy.logrotate
deleted file mode 100644
index 12e25164c..000000000
--- a/smartproxy/ipa-smartproxy.logrotate
+++ /dev/null
@@ -1,11 +0,0 @@
-/var/log/ipa-smartproxy.access /var/log/ipa-smartproxy.errors {
- weekly
- missingok
- notifempty
- sharedscripts
- rotate 52
- compress
- postrotate
- /bin/systemctl reload ipa-smartproxy.service > /dev/null 2>/dev/null || true
- endscript
-}
diff --git a/smartproxy/ipa-smartproxy.py b/smartproxy/ipa-smartproxy.py
index 23788ecf5..8cc704cf9 100644
--- a/smartproxy/ipa-smartproxy.py
+++ b/smartproxy/ipa-smartproxy.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python2 -E
-#
# Authors:
# Rob Crittenden <rcritten@redhat.com>
#
@@ -31,7 +29,7 @@ from cherrypy import response
from ipalib import api
from ipalib import errors
from ipalib.request import context
-from ipaserver.rpcserver import json_encode_binary
+from ipalib.rpc import json_encode_binary
from ipapython.version import VERSION, API_VERSION
from ipapython.ipa_log_manager import root_logger
@@ -393,7 +391,7 @@ wsgi_config = {'environment': 'embedded',
'engine.autoreload_on': False
}
-api.bootstrap(context='ipasmartproxy')
+api.bootstrap(context='ipasmartproxy', log='/dev/null')
api.finalize()
cherrypy.config.update(wsgi_config)
diff --git a/smartproxy/ipa-smartproxy.service b/smartproxy/ipa-smartproxy.service
deleted file mode 100644
index 544f55b13..000000000
--- a/smartproxy/ipa-smartproxy.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=IPA smartproxy for Foreman
-After=ipa.target
-
-[Service]
-ExecStart=/usr/sbin/ipa-smartproxy -c /etc/ipa/ipa-smartproxy.conf -d -p /var/run/ipa-smartproxy.pid
-ExecReload=/bin/kill -USR1 $MAINPID
-Type=forking
-PIDFile=/var/run/ipa-smartproxy.pid
-
-[Install]
-WantedBy=multi-user.target