You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/08/28 15:44:14 UTC

[GitHub] elsloo closed pull request #2759: Remove sudo from trafficrouter RPM scriptlets

elsloo closed pull request #2759: Remove sudo from trafficrouter RPM scriptlets
URL: https://github.com/apache/trafficcontrol/pull/2759
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_router/core/src/main/scripts/postinstall.sh b/traffic_router/core/src/main/scripts/postinstall.sh
index a37ba714d..c4c1e3309 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 800733d2c..372353910 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 56560bbe3..a44c57ae5 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 7307e6de5..63f8e8115 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
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services