Start/Stop services or run scripts/tasks on Linux from your email using the GroupWise 8 client:
In GroupWise Notify options, we can specify if some task has to be done whenever an email has some indication. When you are away from your Linux box and not able to access it, and you want to perform a task on your Linux box, you can do that by just sending an email to your configured GroupWise 8 client.
As an example, I will show you how to start/stop an Apache server on Linux by sending an email.
Step 1: Write a script to start and stop Apache server
The script to start the Apache server is as follows. Save the file as startapache in the /usr/bin directory. Change the access permissions as "chmod 755 /usr/bin/startapache".
Step 2: Start the GroupWise 8 client and create a new rule
- Create a folder "MyTasks" by right clicking your "HOME" and select "New Folder".
- Create a rule.
From menu Tools->Rules->Click "New".
Add a rule name "startapache". Select check box When Event is: "Received" and Item Type is: "Task". Click the button "Define conditions".
In the new dialog, select "Subject" from the dropdown combobox. Enter the text "StartApache" in the text box and click "Ok".
Click the button "Add Action" and select "Move to folder". From the new dialog, select the folder name "MyTasks" check box and click "Move" as shown below.
Step 3: Right click the GroupWise Notify tray icon and select "Options"
- In the "General" Tab, select only the folder you want to have notifications. In our case it is "MyTasks".
- In the "Notify" tab, under standard priority, check the option "Launch program" and enter the text as "/usr/bin/startapache".
- Then click "OK".
That's it, whenever it receives a task, it is moved to "Mytasks", a notification is displayed about the task received and performs the program of starting the Apache server.
Similarly, you can write scripts to do some actions and associate it with rules. Just by sending an email we can do any task we need. In rules, we can set conditions depending on the email id. When you set a condition depending on your personal mail id, whenever you send mail then only it will be performed and will not act from any other person's mail.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.