You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2018/08/28 15:47:23 UTC

[trafficcontrol] branch master updated: remove sudo from RPM scriptlets

This is an automated email from the ASF dual-hosted git repository.

elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new b22187d  remove sudo from RPM scriptlets
b22187d is described below

commit b22187dc3e9ce3142b40782c9149307c5f9b6c0f
Author: Jeffrey Bevill <Je...@comcast.com>
AuthorDate: Tue Aug 28 09:30:35 2018 -0600

    remove sudo from RPM scriptlets
---
 traffic_router/core/src/main/scripts/postinstall.sh | 2 +-
 traffic_router/core/src/main/scripts/preinstall.sh  | 4 ++--
 traffic_router/core/src/main/scripts/preremove.sh   | 2 +-
 traffic_router/tomcat-rpm/tomcat.spec               | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/traffic_router/core/src/main/scripts/postinstall.sh b/traffic_router/core/src/main/scripts/postinstall.sh
index a37ba71..c4c1e33 100644
--- a/traffic_router/core/src/main/scripts/postinstall.sh
+++ b/traffic_router/core/src/main/scripts/postinstall.sh
@@ -30,5 +30,5 @@ fi
 echo "Traffic Router installed successfully."
 
 systemctl daemon-reload
-echo "Start with 'sudo systemctl start traffic_router'"
+echo "Start with 'systemctl start traffic_router'"
 
diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/preinstall.sh
index 800733d..3723539 100644
--- a/traffic_router/core/src/main/scripts/preinstall.sh
+++ b/traffic_router/core/src/main/scripts/preinstall.sh
@@ -21,9 +21,9 @@ chkconfig --list tomcat >/dev/null
 if [ $? -eq 0 ]; then
   /sbin/service tomcat stop
 else
-  /usr/bin/sudo /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
+  /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
 
-  [ $? -eq 0 ] && /usr/bin/sudo /usr/bin/systemctl stop traffic_router
+  [ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
 fi
 
 # delete the expanded war files from the previous version
diff --git a/traffic_router/core/src/main/scripts/preremove.sh b/traffic_router/core/src/main/scripts/preremove.sh
index 56560bb..a44c57a 100644
--- a/traffic_router/core/src/main/scripts/preremove.sh
+++ b/traffic_router/core/src/main/scripts/preremove.sh
@@ -13,4 +13,4 @@
 # limitations under the License.
 #
 
-/usr/bin/sudo /usr/bin/systemctl stop traffic_router
+/usr/bin/systemctl stop traffic_router
diff --git a/traffic_router/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec
index 7307e6d..63f8e81 100644
--- a/traffic_router/tomcat-rpm/tomcat.spec
+++ b/traffic_router/tomcat-rpm/tomcat.spec
@@ -78,7 +78,7 @@ systemctl daemon-reload
 
 echo "Tomcat for Traffic Router installed successfully."
 echo ""
-echo "Start with 'sudo systemctl start traffic_router'"
+echo "Start with 'systemctl start traffic_router'"
 
 %preun