summaryrefslogtreecommitdiff
path: root/devel/gogs/files/gogs-rm-data.in
blob: 4f27af6953e90397c688595be30ab1ab942a8d88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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_LOGDIR%%/* /var/log/gogs.log