ports/devel/gogs/files/gogs-rm-data.in
Yuri Victorovich 0b50fe4fcb New port: devel/gogs: Painless self-hosted Git service
PR:		205283
Submitted by:	Dmitri Goutnik <dg@syrec.org>
Approved by:	tcberner (mentor), adamw (mentor)
Differential Revision:	https://reviews.freebsd.org/D13141
2017-11-20 17:52:35 +00:00

21 lines
615 B
Bash

#!/bin/sh
echo "(!!!)"
echo "(!!!) This utility will delete all %%PORTNAME_FANCY%% databases, repositories and logs"
echo "(!!!) without affecting %%PORTNAME_FANCY%% installation itself."
echo "(!!!) Proceed with caution!"
echo "(!!!)"
echo "(!!!) Hit Ctrl-C now if in doubt."
echo "(!!!)"
while true; do
read -p "This will delete all %%PORTNAME_FANCY%% databases, are you sure you want to proceed? (yes/no) " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
rm -rf %%GOGS_DBDIR%%/*/* %%GOGS_DBDIR%%/*/.ssh \
%%GOGS_LOGDIR%%/* /var/log/gogs.log