-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(xenial_builds): Add Systemd configuration for parent service (#776)
* feat(xenial_builds): Add Systemd configuration for parent service to start and stop all spinnaker services.
- Loading branch information
1 parent
81a8048
commit 29a4910
Showing
1 changed file
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |