diff options
author | Beech Rintoul <beech@FreeBSD.org> | 2008-02-23 23:40:03 +0000 |
---|---|---|
committer | Beech Rintoul <beech@FreeBSD.org> | 2008-02-23 23:40:03 +0000 |
commit | 437ecf6910952fad3af013e4e6bb4a67c2575efc (patch) | |
tree | fc2045e90d8497ce4848762f25013fab6773bc36 /www/instiki/files/instiki.in | |
parent | Add gimp-data-extras (diff) |
- Update to 0.12.0 [1]
- Fix rc file [1]
- Major Makefile cleanup
- Move install to ${DATADIR}
- Fix pkg-plist (pkg_delete)
- Add pkg-message
- Take maintainership
PR: ports/120971
Submitted by: Salvatore Montefusco <sm@brightpebbles.org> [1]
Diffstat (limited to 'www/instiki/files/instiki.in')
-rw-r--r-- | www/instiki/files/instiki.in | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/www/instiki/files/instiki.in b/www/instiki/files/instiki.in index 54dc543be178..75879def6cc0 100644 --- a/www/instiki/files/instiki.in +++ b/www/instiki/files/instiki.in @@ -14,18 +14,40 @@ name="instiki" rcvar=${name}_enable +start_cmd="${name}_start" +status_cmd="${name}_status" +stop_cmd="${name}_stop" #rcvar=`set_rcvar` -command="%%PREFIX%%/%%INSTIKIDIR%%/instiki" -command_interpreter="%%RUBY_WITH_SUFFIX%%" +command="%%DATADIR%%/instiki.rb" +command_interpreter="/usr/bin/env" : ${instiki_enable="NO"} : ${instiki_flags="--port %%INSTIKIPORT%% --daemon"} +instiki_pid=$(ps x | grep "ruby $command" | grep -v grep | awk '{ print $1 }' ) sig_stop=KILL -load_rc_config $name +instiki_start() +{ + unset "start_cmd" + test -n "$instiki_pid" || run_rc_command start +} + +instiki_status() +{ + if [ -n "$instiki_pid" ] ; then + echo "Instiki is running at pid: $instiki_pid" + else + echo "Instiki is not running." + fi +} + +instiki_stop() +{ + test -n "$instiki_pid" && kill -$sig_stop $instiki_pid +} +load_rc_config $name run_rc_command "$1" - |