Register
It is currently Wed Oct 01, 2014 8:21 pm

Xmessage with buttons not work


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Mon Apr 07, 2014 1:02 am   

Joined: Mon Apr 07, 2014 12:57 am
Posts: 2
Hello every one! :)
I write this code with xmessage GUI dialog
Code:
#!/bin/bash

xmessage -buttons "Enable":0,"Disable":1 "Enable or Disable Puppet agent?"

if [ $? == 0 ]; then
   puppet agent --enable


fi

puppet agent --disable


But I have a problem. If I turn Yes button command
Code:
puppet agent --enable
not work.
May you help me?
Thanks in advance! :)


Top
 Profile  
 PostPosted: Mon Apr 07, 2014 1:53 am   

Joined: Mon Apr 07, 2014 12:57 am
Posts: 2
I found answer :)

Code:
#!/bin/bash

xmessage -buttons "Enable":0,"Disable":1 "Enable or Disable Puppet agent?"

if [ $? == 0 ]; then
   puppet agent --enable



else
puppet agent --disable
fi


My error in this:
Code:
fi

puppet agent --disable


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP