pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
i2pd: changed i2pd's RC file
Module Name: pkgsrc-wip
Committed By: Jake Slazenger <jake.slazenger%yandex.com@localhost>
Pushed By: jakeSlaz
Date: Sun Mar 18 14:26:11 2018 +0300
Changeset: 9470f8e079acb0f15774f8723582ac36bc285061
Modified Files:
i2pd/Makefile
Added Files:
i2pd/files/i2pd.in
Removed Files:
i2pd/files/i2pd.sh
Log Message:
i2pd: changed i2pd's RC file
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9470f8e079acb0f15774f8723582ac36bc285061
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
i2pd/Makefile | 7 ++++---
i2pd/files/i2pd.in | 41 +++++++++++++++++++++++++++++++++++++++++
i2pd/files/i2pd.sh | 30 ------------------------------
3 files changed, 45 insertions(+), 33 deletions(-)
diffs:
diff --git a/i2pd/Makefile b/i2pd/Makefile
index f47ccadfa9..a38fc8abb1 100644
--- a/i2pd/Makefile
+++ b/i2pd/Makefile
@@ -40,6 +40,7 @@ CONF_FILES+= ${EGDIR}/i2pd.conf \
.endif
RCD_SCRIPTS+=i2pd
+RCD_SCRIPT_SRC.i2pd=${FILESDIR}/i2pd.in
MAKE_DIRS+=${VARBASE}/log/i2pd
MAKE_DIRS+=${VARBASE}/run/i2pd
@@ -48,13 +49,13 @@ MAKE_DIRS_PERMS+=${VARBASE}/log/i2pd \
${I2PD_USER} ${I2PD_GROUP} 0755
MAKE_DIRS_PERMS+=${VARBASE}/run/i2pd \
- ${I2PD_USER} ${I2PD_GROUP} 0755
+ ${I2PD_USER} ${I2PD_GROUP} 0700
MAKE_DIRS_PERMS+=${PREFIX}/var/i2pd \
- ${I2PD_USER} ${I2PD_GROUP} 0755
+ ${I2PD_USER} ${I2PD_GROUP} 0700
MAKE_DIRS_PERMS+=${PREFIX}/var/i2pd/certificates \
- ${I2PD_USER} ${I2PD_GROUP} 0755
+ ${I2PD_USER} ${I2PD_GROUP} 0700
post-install:
${INSTALL_MAN} ${I2PD_SOURCESDIR}/debian/i2pd.1 \
diff --git a/i2pd/files/i2pd.in b/i2pd/files/i2pd.in
new file mode 100644
index 0000000000..7a69ad0879
--- /dev/null
+++ b/i2pd/files/i2pd.in
@@ -0,0 +1,41 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD $
+#
+# PROVIDE: i2pd
+# REQUIRE: DAEMON NETWORKING
+# KEYWORD: shutdown
+#
+# Variables in rc.conf to enable i2pd:
+#
+# i2pd=YES
+
+if test -f /etc/rc.subr
+then
+ . /etc/rc.subr
+fi
+
+name="i2pd"
+rcvar=$name
+command="@PREFIX@/bin/i2pd"
+extra_commands="reload"
+reload_cmd="i2pd_reload"
+required_files="@PKG_SYSCONFDIR@/i2pd.conf"
+i2pd_user="i2pd"
+i2pd_group="i2pd"
+i2pd_chdir="@PREFIX@/var/lib/i2pd"
+i2pd_flags="--conf=@PKG_SYSCONFDIR@/i2pd.conf --service $rc_flags"
+stop_cmd="i2pd_stop"
+
+i2pd_stop()
+{
+ kill -INT `cat @VARBASE@/run/i2pd/i2pd.pid`
+}
+
+i2pd_reload()
+{
+ kill -HUP `cat @VARBASE@/run/i2pd/i2pd.pid`
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/i2pd/files/i2pd.sh b/i2pd/files/i2pd.sh
deleted file mode 100644
index ed48bc14cd..0000000000
--- a/i2pd/files/i2pd.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD $
-#
-# PROVIDE: i2pd
-# REQUIRE: DAEMON NETWORKING
-# KEYWORD: shutdown
-#
-# Variables in rc.conf to enable i2pd:
-#
-# i2pd=YES
-
-if test -f /etc/rc.subr
-then
- . /etc/rc.subr
-fi
-
-name="i2pd"
-rcvar=$name
-command="@PREFIX@/bin/i2pd"
-required_files="@PKG_SYSCONFIG@/i2pd.conf"
-i2pd_user="i2pd"
-i2pd_group="i2pd"
-i2pd_flags="--conf=@PKG_SYSCONFIG@/i2pd.conf"
-stop_cmd="i2pd_stop"
-
-i2pd_stop()
-{
- kill -INT `cat /var/run/i2pd/i2pd.pid`
-}
Home |
Main Index |
Thread Index |
Old Index