Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xenial_builds): Add Systemd configuration for parent service #776

Merged
merged 2 commits into from
Nov 28, 2017
Merged
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
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