ports/sysutils/py-google-compute-engine/files/google_ip_forwarding_daemon.in
Richard Gallamore 9c025a94bc Google Compute Engine offers scripts and daemons which runs in the
background and provides the following services:

- Accounts daemon to setup and manage user accounts, and to enable SSH key based
  authentication.
- Clock skew daemon to keep the system clock in sync after VM start and stop
  events.
- Instance setup scripts to execute VM configuration scripts during boot.
- IP forwarding daemon that integrates network load balancing with forwarding
  rule changes into the guest.
- Metadata scripts to run user provided scripts at VM startup and shutdown.
- Network setup service to enable multiple network interfaces on boot.

WWW: https://github.com/GoogleCloudPlatform/compute-image-packages

PR:		219687
Submitted by:	Helen Koike (maintainer)
Reviewed by:	matthew (mentor), koobs, sunpoet, swills, julian
Approved by:	matthew (mentor)
Differential Revision:	https://reviews.freebsd.org/D12077
2017-08-19 18:02:55 +00:00

34 lines
773 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: google_ip_forwarding_daemon
# BEFORE: LOGIN
# REQUIRE: NETWORKING syslogd google_instance_setup google_network_setup
# KEYWORD: shutdown
#
# google_ip_forwarding_daemon_enable (bool): Set to NO by default.
# Set it to YES to enable google_ip_forwarding_daemon.
#
. /etc/rc.subr
name="google_ip_forwarding_daemon"
rcvar="google_ip_forwarding_daemon_enable"
load_rc_config "${name}"
: ${google_ip_forwarding_daemon_enable:="NO"}
command_interpreter="%%PYTHON_CMD%%"
command=%%PREFIX%%/bin/${name}
pidfile=/var/run/${name}.pid
start_cmd="google_ip_forwarding_daemon_start"
google_ip_forwarding_daemon_start()
{
check_startmsgs && echo "Starting ${name}."
daemon -p ${pidfile} -t ${name} ${command}
}
run_rc_command "$1"