Cool Solutions

Start/Stop Services or Run Scripts on Linux with GroupWise 8



By:

January 30, 2009 4:13 pm

Reads: 9167

Comments:0

Score:0

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”.

#!/usr/bin
rcapache2 start

Step 2: Start the GroupWise 8 client and create a new rule

  1. Create a folder “MyTasks” by right clicking your “HOME” and select “New Folder”.
  2. 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”

  1. In the “General” Tab, select only the folder you want to have notifications. In our case it is “MyTasks”.

  2. In the “Notify” tab, under standard priority, check the option “Launch program” and enter the text as “/usr/bin/startapache”.

  3. 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.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: This content is not supported by Novell. 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 it thoroughly before using it in a production environment.

Comment

RSS