git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] git-remote-mediawiki: allow stop/start-ing the test server

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Apr 23, 2014, 14:34 UTC
Message-ID
<1398263669-16594-1-git-send-email-Matthieu.Moy@imag.fr>

Previously, the user had to launch a complete re-install after a lighttpd stop (e.g. a reboot).

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 contrib/mw-to-git/t/install-wiki.sh   | 10 ++++++++++
 contrib/mw-to-git/t/test-gitmw-lib.sh |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/contrib/mw-to-git/t/install-wiki.sh b/contrib/mw-to-git/t/install-wiki.sh
index 70a53f6..c215213 100755
--- a/contrib/mw-to-git/t/install-wiki.sh
+++ b/contrib/mw-to-git/t/install-wiki.sh
@@ -20,6 +20,8 @@ usage () {
 	echo "		install | -i :	Install a wiki on your computer."
 	echo "		delete | -d : Delete the wiki and all its pages and "
 	echo "			content."
+	echo "		start  | -s : Start the previously configured lighttpd daemon"
+	echo "		stop        : Stop lighttpd daemon."
 }
 
 
@@ -33,6 +35,14 @@ case "$1" in
 		wiki_delete
 		exit 0
 		;;
+	"start" | "-s")
+		start_lighttpd
+		exit
+		;;
+	"stop")
+		stop_lighttpd
+		exit
+		;;
 	"--help" | "-h")
 		usage
 		exit 0
diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh
index 3372b2a..d9a1149 100755
--- a/contrib/mw-to-git/t/test-gitmw-lib.sh
+++ b/contrib/mw-to-git/t/test-gitmw-lib.sh
@@ -289,7 +289,6 @@ start_lighttpd () {
 # Kill daemon lighttpd and removes files and folders associated.
 stop_lighttpd () {
 	test -f "$WEB_TMP/pid" && kill $(cat "$WEB_TMP/pid")
-	rm -rf "$WEB"
 }
 
 # Create the SQLite database of the MediaWiki. If the database file already
@@ -415,6 +414,7 @@ wiki_reset () {
 wiki_delete () {
 	if test $LIGHTTPD = "true"; then
 		stop_lighttpd
+		rm -fr "$WEB"
 	else
 		# Delete the wiki's directory.
 		rm -rf "$WIKI_DIR_INST/$WIKI_DIR_NAME" ||
-- 
1.9.2.667.ge5b74e1
Next: Matthieu Moy
Message 1 of 2 in “git-remote-mediawiki: allow stop/start-ing the test server”
  1. 1/2 git-remote-mediawiki: allow stop/start-ing the test serverMatthieu Moy, Apr 23, 2014
  2. 2/2 git-remote-mediawiki: fix encoding issue for UTF-8 media filesMatthieu Moy, Apr 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.