From fbbdba3514408b5ead537bbd2cf9b8a09265ae5f Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sat, 8 Feb 2014 23:32:24 +0000 Subject: [PATCH] Add default configuration file for droned. Also mark configuration file as conffiles. --- Makefile | 3 ++- deb/drone/DEBIAN/conffiles | 2 ++ deb/drone/etc/default/drone | 10 ++++++++++ deb/drone/etc/init/drone.conf | 8 ++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 deb/drone/DEBIAN/conffiles create mode 100644 deb/drone/etc/default/drone diff --git a/Makefile b/Makefile index a8fe1a6a..c14a65db 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ test: install: cp deb/drone/etc/init/drone.conf /etc/init/drone.conf + test -f /etc/default/drone || cp deb/drone/etc/default/drone /etc/default/drone cd bin && install -t /usr/local/bin drone cd bin && install -t /usr/local/bin droned mkdir -p /var/lib/drone @@ -75,4 +76,4 @@ dpkg: dpkg-deb --build deb/drone run: - bin/droned --port=":8080" --datasource="/tmp/drone.sqlite" \ No newline at end of file + bin/droned --port=":8080" --datasource="/tmp/drone.sqlite" diff --git a/deb/drone/DEBIAN/conffiles b/deb/drone/DEBIAN/conffiles new file mode 100644 index 00000000..fb1baab8 --- /dev/null +++ b/deb/drone/DEBIAN/conffiles @@ -0,0 +1,2 @@ +/etc/init/drone.conf +/etc/default/drone diff --git a/deb/drone/etc/default/drone b/deb/drone/etc/default/drone new file mode 100644 index 00000000..1eaa2679 --- /dev/null +++ b/deb/drone/etc/default/drone @@ -0,0 +1,10 @@ +# Upstart configuration file for droned. + +# Command line options: +# +# -datasource="drone.sqlite": +# -driver="sqlite3": +# -path="": +# -port=":8080": +# +#DRONED_OPTS="--port=:80" diff --git a/deb/drone/etc/init/drone.conf b/deb/drone/etc/init/drone.conf index 102b2bc3..6cae6ac3 100644 --- a/deb/drone/etc/init/drone.conf +++ b/deb/drone/etc/init/drone.conf @@ -4,5 +4,9 @@ chdir /var/lib/drone console log script - droned --port=":80" -end script \ No newline at end of file + DRONED_OPTS="--port=:80" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + droned $DRONED_OPTS +end script