diff options
author | skreuzer <skreuzer@FreeBSD.org> | 2010-04-14 21:58:53 +0800 |
---|---|---|
committer | skreuzer <skreuzer@FreeBSD.org> | 2010-04-14 21:58:53 +0800 |
commit | 34d9c36ebf00fb10bd78406935475138b8eb67ae (patch) | |
tree | 7ae4a4e1513739d0ce870f1e16d0734a5d1f433f /www | |
parent | 71099bf4ae9ccf39217d18b2adb030a60c542a94 (diff) | |
download | freebsd-ports-gnome-34d9c36ebf00fb10bd78406935475138b8eb67ae.tar.gz freebsd-ports-gnome-34d9c36ebf00fb10bd78406935475138b8eb67ae.tar.zst freebsd-ports-gnome-34d9c36ebf00fb10bd78406935475138b8eb67ae.zip |
I forgot to add some new files so the Previous commit was incomplete.
PR: ports/144262
Submitted by: Peter Vereshagin <peter@vereshagin.org>
Diffstat (limited to 'www')
-rw-r--r-- | www/p5-FCGI-Spawn/files/fcgi_spawn.in | 29 | ||||
-rw-r--r-- | www/p5-FCGI-Spawn/pkg-deinstall | 16 | ||||
-rw-r--r-- | www/p5-FCGI-Spawn/pkg-install | 34 |
3 files changed, 79 insertions, 0 deletions
diff --git a/www/p5-FCGI-Spawn/files/fcgi_spawn.in b/www/p5-FCGI-Spawn/files/fcgi_spawn.in new file mode 100644 index 000000000000..ac3ef3e7b4b9 --- /dev/null +++ b/www/p5-FCGI-Spawn/files/fcgi_spawn.in @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: fcgi_spawn +# REQUIRE: LOGIN %%MYSQL%% %%PGSQL%% +# BEFORE: +# KEYWORD: shutdown + +. %%RC_SUBR%% + +name="fcgi_spawn" +rcvar=${name}_enable + +fcgi_spawn_enable=${fcgi_spawn_enable:-"NO"} +pidfile=${fcgi_spawn_pid:-"/var/run/${name}.pid"} + +load_rc_config ${name} + +fcgi_spawn_config_path=${fcgi_spawn_config_path:-"/usr/local/etc/${name}"} +fcgi_spawn_log=${fcgi_spawn_log:-"/var/log/${name}.log"} +fcgi_spawn_socket_path=${fcgi_spawn_socket_path:-"/tmp/spawner.sock"} +fcgi_spawn_redefine_exit=${fcgi_spawn_redefine_exit:-"0"} +fcgi_spawn_username=${fcgi_spawn_username:-"fcgi"} +fcgi_spawn_groupname=${fcgi_spawn_groupname:-"fcgi"} +fcgi_spawn_flags=${fcgi_spawn_flags:-""} +command="%%PREFIX%%/bin/${name}" +command_args="-l ${fcgi_spawn_log} -p ${pidfile} -c ${fcgi_spawn_config_path} -u ${fcgi_spawn_username} -g ${fcgi_spawn_groupname} -s ${fcgi_spawn_socket_path}" +required_dirs=${fcgi_spawn_config_path} + +run_rc_command "$1" diff --git a/www/p5-FCGI-Spawn/pkg-deinstall b/www/p5-FCGI-Spawn/pkg-deinstall new file mode 100644 index 000000000000..17dd3452ada8 --- /dev/null +++ b/www/p5-FCGI-Spawn/pkg-deinstall @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +USER=fcgi + +if pw usershow "${USER}" 2>/dev/null 1>&2; then + echo "To delete user permanently, use 'pw userdel ${USER}'. Also, unused groups of that user should be deleted, too" +fi + +exit 0 diff --git a/www/p5-FCGI-Spawn/pkg-install b/www/p5-FCGI-Spawn/pkg-install new file mode 100644 index 000000000000..64d8de07eb78 --- /dev/null +++ b/www/p5-FCGI-Spawn/pkg-install @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +USER=fcgi +GROUP=${USER} + +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then + if pw groupadd ${GROUP} ; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then + if pw useradd ${USER} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "FastCGI Spawner"; \ + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi + +exit 0 |