changeset 119:36ef2cc4fafa

templates: cleanup rc
author David Demelier <markand@malikania.fr>
date Sun, 10 Mar 2019 11:14:24 +0100
parents a2f33cc10594
children 5259bdf60de7
files templates/rc
diffstat 1 files changed, 8 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/templates/rc	Sun Mar 10 09:57:32 2019 +0100
+++ b/templates/rc	Sun Mar 10 11:14:24 2019 +0100
@@ -1,23 +1,14 @@
 #!/bin/sh
 #
-# Copyright (c) 2019 FirstName LastName <mailaddress>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
+# /etc/rc.d/template: run control script for template
 
-TEMPLATE_CMD=/usr/sbin/template
-TEMPLATE_ARGS=--foo
-TEMPLATE_PID=/var/run/template/template.pid
+if [ -f /etc/rc.conf ]; then
+	source /etc/rc.conf
+fi
+
+: ${TEMPLATE_CMD:=/usr/sbin/template}
+: ${TEMPLATE_ARGS:=--foo}
+: ${TEMPLATE_PID:=/var/run/template/template.pid}
 
 template_start()
 {