Skip to content

Commit

Permalink
feat(xenial_builds): Add Systemd configuration for parent service (#776)
Browse files Browse the repository at this point in the history
* feat(xenial_builds): Add Systemd configuration for parent service to
start and stop all spinnaker services.
  • Loading branch information
brandonnelson3 authored Nov 28, 2017
1 parent 81a8048 commit 29a4910
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions halyard-deploy/src/main/resources/debian/init.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
cat > /etc/init/spinnaker.conf <<EOL
description "spinnaker"
source /etc/os-release

if [ "$VERSION_ID" = "14.04" ]; then
cat > /etc/init/spinnaker.conf <<EOL
description "spinnaker"
start on filesystem or runlevel [2345]
stop on shutdown
pre-start script
for i in {%services%}
do
if [ ! -d "/var/log/spinnaker/\$i" ]; then
echo "/var/log/spinnaker/\$i does not exist. Creating it..."
install --mode=755 --owner=spinnaker --group=spinnaker --directory /var/log/spinnaker/\$i
fi
service \$i start
done
end script
EOL
elif [ "$VERSION_ID" = "16.04" ]; then
cat > /lib/systemd/system/spinnaker.service <<EOL
[Unit]
Description=All Spinnaker services
After=network.target
Wants=gate.service orca.service clouddriver.service front50.service rosco.service igor.service echo.service fiat.service
[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOL
fi

0 comments on commit 29a4910

Please sign in to comment.