+ if pgrep git-mirror >& /dev/null; then
+ echo "git-mirror instance is running"
+ else
+ echo "Cleaned LOCK"
+ rm /git-mirror/LOCK
+ fi
+}
+
+function status () {
+ pids=$(pgrep git-mirror)
+ if [ -n "$pids" ] ; then
+ echo "Active processes"
+ ps $pids
+ else
+ echo "No running instance of git-mirror"
+ fi
+ echo "Lock file status"
+ ls -l /git-mirror/LOCK
+}
+
+function clean () {
+ totrash=$(ls /git-mirror/*/NOTIFIED 2> /dev/null)
+ if [ -z "$totrash" ] ; then
+ echo "No NOTIFIED file found"
+ else
+ echo "Trashing the following files"
+ ls -l $totrash
+ rm -f $totrash
+ echo Done
+ fi