@@ -1,11 +1,8 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-padlock: lock/unlock EncFS-encrypted directory with GPG key/passphrase
-"""
+#!/bin/sh
+#
 # Copyright (C) 2014 Hartmut Goebel <h.goebel@crazy-compilers.com>
 # Part of the DebOps project - http://debops.org/
-
+#
 # This program is free software; you can redistribute
 # it and/or modify it under the terms of the
 # GNU General Public License as published by the Free
@@ -27,41 +24,9 @@ padlock: lock/unlock EncFS-encrypted directory with GPG key/passphrase
 # be downloaded from the FSF web page at:
 # http://www.gnu.org/copyleft/gpl.html
 
-import os
-import argparse
-
-from debops import *
-from debops.cmds import *
-
-__author__ = "Hartmut Goebel <h.goebel@crazy-compilers.com>"
-__copyright__ = "Copyright 2014 by Hartmut Goebel <h.goebel@crazy-compilers.com>"
-__licence__ = "GNU General Public License version 3 (GPL v3) or later"
-
-
-def main(action):
-    require_commands('encfs', 'fusermount', 'gpg')
-
-    # Get the absolute path to script's directory
-    encfs_encrypted = os.path.dirname(os.path.realpath(__file__))
-
-    if action == 'lock':
-        # Unmount the directory if mounted ...
-        if padlock_lock(encfs_encrypted):
-            print("Locked!")
-        else:
-            print("Is already locked.")
-    elif action == 'unlock':
-        # ... or mount it if unmounted
-        if padlock_unlock(encfs_encrypted):
-            print("Unlocked!")
-        else:
-            print("Is already unlocked.")
-
-parser = argparse.ArgumentParser()
-parser.add_argument('action', choices=['lock', 'unlock'])
-args = parser.parse_args()
-
-try:
-    main(args.action)
-except KeyboardInterrupt:
-    raise SystemExit('... aborted')
+if [ -z "$(which debops-padlock 2>/dev/null)" ] ; then
+    echo "Command 'debops-padlock' is missing, please install debops."
+    echo "See http://www.debops.org/ for more information."
+    exit 10
+fi
+debops-padlock "$@"