Skip to content

Commit

Permalink
Updated service wrapper lifecycle scripts to support Ubuntu 16 (#2050)
Browse files Browse the repository at this point in the history
* Updated service wrapper lifecycle scripts to support Ubuntu 16
  • Loading branch information
Andrew Reslan authored and tleyden committed Aug 25, 2016
1 parent 25e68e8 commit 660b1c9
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
10 changes: 10 additions & 0 deletions service/sg_accel_service_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ case $OS in
#service ${SERVICE_NAME} start
fi
;;
16)
if [ "$SERVICE_CMD_ONLY" = true ]; then
echo "systemctl start ${SERVICE_NAME}"
else
pre_install_actions
render_template script_templates/systemd_debian_sync_gateway.tpl > /lib/systemd/system/${SERVICE_NAME}.service
systemctl enable ${SERVICE_NAME}
systemctl start ${SERVICE_NAME}
fi
;;
*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down
9 changes: 9 additions & 0 deletions service/sg_accel_service_uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ case $OS in
rm /etc/init/${SERVICE_NAME}.conf
fi
;;
16)
systemctl stop ${SERVICE_NAME}
systemctl disable ${SERVICE_NAME}

if [ -f /lib/systemd/system/${SERVICE_NAME}.service ]; then
rm /lib/systemd/system/${SERVICE_NAME}.service
fi
;;

*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down
6 changes: 5 additions & 1 deletion service/sg_accel_service_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ case $OS in
Ubuntu)
case $OS_MAJOR_VERSION in
12|14)
service ${SERVICE_NAME} stop
service ${SERVICE_NAME} stop
service ${SERVICE_NAME} start
;;
16)
systemctl stop ${SERVICE_NAME}
systemctl start ${SERVICE_NAME}
;;
*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down
10 changes: 10 additions & 0 deletions service/sync_gateway_service_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ case $OS in
service ${SERVICE_NAME} start
fi
;;
16)
if [ "$SERVICE_CMD_ONLY" = true ]; then
echo "systemctl start ${SERVICE_NAME}"
else
pre_install_actions
render_template script_templates/systemd_debian_sync_gateway.tpl > /lib/systemd/system/${SERVICE_NAME}.service
systemctl enable ${SERVICE_NAME}
systemctl start ${SERVICE_NAME}
fi
;;
*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down
10 changes: 9 additions & 1 deletion service/sync_gateway_service_uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,19 @@ case $OS in
Ubuntu)
case $OS_MAJOR_VERSION in
12|14)
service ${SERVICE_NAME} stop
service ${SERVICE_NAME} stop
if [ -f /etc/init/${SERVICE_NAME}.conf ]; then
rm /etc/init/${SERVICE_NAME}.conf
fi
;;
16)
systemctl stop ${SERVICE_NAME}
systemctl disable ${SERVICE_NAME}

if [ -f /lib/systemd/system/${SERVICE_NAME}.service ]; then
rm /lib/systemd/system/${SERVICE_NAME}.service
fi
;;
*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down
4 changes: 4 additions & 0 deletions service/sync_gateway_service_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ case $OS in
service ${SERVICE_NAME} stop
service ${SERVICE_NAME} start
;;
16)
systemctl stop ${SERVICE_NAME}
systemctl start ${SERVICE_NAME}
;;
*)
echo "ERROR: Unsupported Ubuntu Version \"$VER\""
usage
Expand Down

0 comments on commit 660b1c9

Please sign in to comment.