diff options
Diffstat (limited to 'www/instiki/files')
| -rw-r--r-- | www/instiki/files/instiki.in | 30 | ||||
| -rw-r--r-- | www/instiki/files/pkg-deinstall.in | 4 | ||||
| -rw-r--r-- | www/instiki/files/pkg-message.in | 15 | 
3 files changed, 43 insertions, 6 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" - diff --git a/www/instiki/files/pkg-deinstall.in b/www/instiki/files/pkg-deinstall.in index e810545974e9..5200db8324c4 100644 --- a/www/instiki/files/pkg-deinstall.in +++ b/www/instiki/files/pkg-deinstall.in @@ -5,9 +5,9 @@ if [ "$2" != "DEINSTALL" ]; then      exit 0  fi -echo "comparing databases in %%PREFIX%%/%%INSTIKIDIR%%/db" +echo "comparing databases in %%DATADIR%%/db" -cd %%PREFIX%%/%%INSTIKIDIR%%/db || exit 1 +cd %%DATADIR%%/db || exit 1  if ! cmp -s -z production.db.sqlite3 default.db.sqlite3; then      echo "production.db.sqlite3 changed from default, not removing"  else diff --git a/www/instiki/files/pkg-message.in b/www/instiki/files/pkg-message.in new file mode 100644 index 000000000000..c80d9ea1796d --- /dev/null +++ b/www/instiki/files/pkg-message.in @@ -0,0 +1,15 @@ +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  + +instiki has been installed in %%DATADIR%% + +Please add: + +	instiki_enable="YES" to your /etc/rc.conf  + +From a terminal do: + +	%%LOCALBASE%%/etc/rc.d/instwiki start + +Point your browser to: http://localhost:2500 for setup. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   | 
