Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions traffic_ops/build/traffic_ops.spec
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ if [ "$1" == "2" ]; then
fi

%post
%__cp %{PACKAGEDIR}/etc/init.d/traffic_ops /etc/init.d/traffic_ops
%__cp %{PACKAGEDIR}/etc/systemd/system/traffic_ops.service /etc/systemd/system/traffic_ops.service
%__mkdir -p /var/www/files
%__mkdir -p /etc/cron.d/
%__cp %{PACKAGEDIR}/etc/cron.d/trafops_dnssec_refresh /etc/cron.d/trafops_dnssec_refresh
Expand All @@ -182,14 +182,13 @@ fi
%__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops_golang /etc/logrotate.d/traffic_ops_golang
%__cp %{PACKAGEDIR}/etc/logrotate.d/traffic_ops_access /etc/logrotate.d/traffic_ops_access
%__cp %{PACKAGEDIR}/etc/profile.d/traffic_ops.sh /etc/profile.d/traffic_ops.sh
%__chown root:root /etc/init.d/traffic_ops
%__chown root:root /etc/systemd/system/traffic_ops.service
%__chown root:root /etc/cron.d/trafops_dnssec_refresh
%__chown root:root /etc/cron.d/autorenew_certs
%__chown root:root /etc/cron.d/trafops_clean_isos
%__chown root:root /etc/logrotate.d/traffic_ops
%__chown root:root /etc/logrotate.d/traffic_ops_golang
%__chown root:root /etc/logrotate.d/traffic_ops_access
%__chmod +x /etc/init.d/traffic_ops
%__chmod +x %{PACKAGEDIR}/install/bin/*
/sbin/chkconfig --add traffic_ops

Expand Down Expand Up @@ -231,7 +230,7 @@ fi
if [ "$1" = "0" ]; then
# this is an uninstall
%__rm -rf %{PACKAGEDIR}
%__rm /etc/init.d/traffic_ops
%__rm /etc/systemd/system/traffic_ops.service
/usr/bin/getent passwd %{TRAFFIC_OPS_USER} || /usr/sbin/userdel %{TRAFFIC_OPS_USER}
/usr/bin/getent group %{TRAFFIC_OPS_GROUP} || /usr/sbin/groupdel %{TRAFFIC_OPS_GROUP}
fi
Expand Down
94 changes: 0 additions & 94 deletions traffic_ops/etc/init.d/traffic_ops

This file was deleted.

33 changes: 33 additions & 0 deletions traffic_ops/etc/systemd/system/traffic_ops.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

[Unit]
Description=Traffic Ops - administrative for the CDN
After=network.target

[Service]
Type=simple
Environment=TO_DIR=/opt/traffic_ops/app
WorkingDirectory=/opt/traffic_ops/app
LimitNOFILE=200000
ExecStart=/opt/traffic_ops/app/bin/traffic_ops_golang \
-cfg /opt/traffic_ops/app/conf/cdn.conf \
-dbcfg /opt/traffic_ops/app/conf/production/database.conf \
-riakcfg /opt/traffic_ops/app/conf/production/riak.conf \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Riak is deprecated. I know I see the comments in the logs during start with current init.d

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @smalenfant should I remove the riakcfg here?

-backendcfg /opt/traffic_ops/app/conf/production/backends.conf
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target