X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ninjahelper;h=aedeaf5b84db577b0d1e76fbb9f8d648cb733e9b;hb=581049b6b103ed64c7a7ccb7b364a9d9b1597495;hp=f4871830e0143f7fd653d9b9db308932a4765bb1;hpb=67b5cf70d7a48bf9333e448b0d1ca53aacc252ea;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/ninjahelper b/ninjahelper index f487183..aedeaf5 100755 --- a/ninjahelper +++ b/ninjahelper @@ -145,6 +145,23 @@ doaction() { ##################################################### ## begin program +if [ ! -x "`which dialog`" ]; then + echo "ninjahelper is a menu based wizard for backupninja." + echo "It requires 'dialog' in order to run. Do you want to install dialog now?" + while true; do + echo -n "(yes/no): " + read install + if [ "$install" == "yes" ]; then + apt-get install dialog + break + elif [ "$install" == "no" ]; then + exit + else + echo "You must answer 'yes' or 'no'" + fi + done +fi + conffile="/etc/backupninja.conf" if [ ! -r "$conffile" ]; then echo "Configuration file $conffile not found."