diff --git a/service/sg_accel_service_install.sh b/service/sg_accel_service_install.sh index 7eaa71d237..ee85943b72 100755 --- a/service/sg_accel_service_install.sh +++ b/service/sg_accel_service_install.sh @@ -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 diff --git a/service/sg_accel_service_uninstall.sh b/service/sg_accel_service_uninstall.sh index a0dc36f575..c6b6d545a9 100755 --- a/service/sg_accel_service_uninstall.sh +++ b/service/sg_accel_service_uninstall.sh @@ -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 diff --git a/service/sg_accel_service_upgrade.sh b/service/sg_accel_service_upgrade.sh index 89aeb2fe80..1bcc4ff5b9 100755 --- a/service/sg_accel_service_upgrade.sh +++ b/service/sg_accel_service_upgrade.sh @@ -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 diff --git a/service/sync_gateway_service_install.sh b/service/sync_gateway_service_install.sh index 620b66a316..16e0fc93e3 100755 --- a/service/sync_gateway_service_install.sh +++ b/service/sync_gateway_service_install.sh @@ -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 diff --git a/service/sync_gateway_service_uninstall.sh b/service/sync_gateway_service_uninstall.sh index 3e8c423976..d5cb719313 100755 --- a/service/sync_gateway_service_uninstall.sh +++ b/service/sync_gateway_service_uninstall.sh @@ -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 diff --git a/service/sync_gateway_service_upgrade.sh b/service/sync_gateway_service_upgrade.sh index bfef53fcbf..a7def55901 100755 --- a/service/sync_gateway_service_upgrade.sh +++ b/service/sync_gateway_service_upgrade.sh @@ -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