Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default Set global variable

    If I wanted to set a global environment variable and make it permanent and available at bootup, that would be by setting it in a script placed in /etc/profile.d , is that correct?

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yes. Make sure it's chmod +x with the shebang line (e.g. #!/bin/sh) and then export your variable in it.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    Given the success of the GZIP=--rsyncable setting as applied to backups, is there any reason NOT to set that as a permanent, global variable? Will that force gzip to always use --rsyncable, system wide? Is there anyway to negate that locally, say by setting GZIP=null during script execution?

  4. #4
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    da 'bump' n grind...

  5. #5
    Member
    Join Date
    Sep 2002
    Posts
    282

    Default

    Quote Originally Posted by Lyttek View Post
    Given the success of the GZIP=--rsyncable setting as applied to backups, is there any reason NOT to set that as a permanent, global variable? Will that force gzip to always use --rsyncable, system wide? Is there anyway to negate that locally, say by setting GZIP=null during script execution?
    you should do
    unset GZIP
    to remove a value, not set it to a particular one

Similar Threads & Tags
Similar threads

  1. SpamAssassin: How to set up global filters?
    By SuperBaby in forum E-mail Discussions
    Replies: 0
    Last Post: 10-01-2010, 01:58 AM
  2. SpamAssassin: How to set up global filters?
    By SuperBaby in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-01-2010, 01:58 AM
  3. How should I set up a global DNS presence?
    By JamesAB in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 04-06-2010, 04:58 PM
  4. Unable to locate Java. Please set JAVA_HOME environment variable.
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-06-2008, 10:51 PM
  5. TERM environment variable not set
    By Snowman30 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-15-2004, 10:10 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube