Skip to content

Commit 1c4ea83

Browse files
moygitster
authored andcommitted
git-remote-mediawiki: allow stop/start-ing the test server
Previously, the user had to launch a complete re-install after a lighttpd stop (e.g. a reboot). Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 779792a commit 1c4ea83

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

contrib/mw-to-git/t/install-wiki.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ usage () {
2020
echo " install | -i : Install a wiki on your computer."
2121
echo " delete | -d : Delete the wiki and all its pages and "
2222
echo " content."
23+
echo " start | -s : Start the previously configured lighttpd daemon"
24+
echo " stop : Stop lighttpd daemon."
2325
}
2426

2527

@@ -33,6 +35,14 @@ case "$1" in
3335
wiki_delete
3436
exit 0
3537
;;
38+
"start" | "-s")
39+
start_lighttpd
40+
exit
41+
;;
42+
"stop")
43+
stop_lighttpd
44+
exit
45+
;;
3646
"--help" | "-h")
3747
usage
3848
exit 0

contrib/mw-to-git/t/test-gitmw-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ start_lighttpd () {
289289
# Kill daemon lighttpd and removes files and folders associated.
290290
stop_lighttpd () {
291291
test -f "$WEB_TMP/pid" && kill $(cat "$WEB_TMP/pid")
292-
rm -rf "$WEB"
293292
}
294293

295294
# Create the SQLite database of the MediaWiki. If the database file already
@@ -415,6 +414,7 @@ wiki_reset () {
415414
wiki_delete () {
416415
if test $LIGHTTPD = "true"; then
417416
stop_lighttpd
417+
rm -fr "$WEB"
418418
else
419419
# Delete the wiki's directory.
420420
rm -rf "$WIKI_DIR_INST/$WIKI_DIR_NAME" ||

0 commit comments

Comments
 (0)