How to allow password protected start-stop-daemon functionality?
        Posted  
        
            by 
                Mahmoud Abdelkader
            
        on Super User
        
        See other posts from Super User
        
            or by Mahmoud Abdelkader
        
        
        
        Published on 2011-01-11T23:03:41Z
        Indexed on 
            2011/01/11
            23:55 UTC
        
        
        Read the original article
        Hit count: 341
        
I would like to use Ubuntu's start-stop-daemon to start my application, but the application protects some sensitive information, so I have a mechanism where the application prompts for a password that's then used to generate a hashkey, which is used as the secret key for a symmetric encryption (AES) to encrypt and decrypt things from a database.
I'd like to daemonize this application and have it run from start-stop-daemon, so that sudo service appname stop and sudo service appname start would work, but, I'm not sure how to go about doing this with the added complexity of a password prompt.
Is there something that supports this or do I have to program it from scratch? I figured I should ask first before re-inventing the wheel.
Thanks in advance.
© Super User or respective owner