Masato Taruishi
taru****@sourc*****
2004年 6月 17日 (木) 14:27:43 JST
=================================================================== RCS file: ultrapossum/module/server/formatdb.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ultrapossum/module/server/formatdb.sh 2004/06/16 09:52:10 1.7 +++ ultrapossum/module/server/formatdb.sh 2004/06/17 05:27:43 1.8 @@ -15,6 +15,8 @@ # GNU General Public License for more details. # +# Usage: formatdb.sh [-f] + # $Id$ set -e @@ -22,10 +24,22 @@ eval `ultrapossum-config get MODULEDIR DIRECTORY CONFSTATUS CHROOTDIRECTORY` if test `$MODULEDIR/server/startup status` = "running"; then - echo "E: UltraPossum server is running" 1>&2 - exit 1 + if test "x$1" = "x-f"; then + echo -n "W: UltraPossum server is running... Stopping... " 1>&2 + status=started + $MODULEDIR/server/startup stop 1>&2 + echo "" 1>&2 + else + echo "E: UltraPossum server is running" 1>&2 + exit 1 + fi fi /bin/rm -rf $DIRECTORY $CONFSTATUS $CHROOTDIRECTORY$DIRECTORY update-ultrapossum configure + +if test "x$status" = "xstarted"; then + $MODULEDIR/server/startup start 1>&2 + echo "UltraPossum started" 1>&2 +fi