Creating simple shell script packages to deploy with ARD and TaskServer

I am looking for a simple step by step on how to create a package that can be deployed using ARD, to run a simple shell script like
"softwareupdate -i -a"
A brief search here returned nothing, but perhaps I was not using the correct terms.
Ultimately, I want to use ARD to run software update on ~400 Macs.
Thanks in advance for your help.
Bill

If I send it as a unix command, it will run only on machines that are currently awake and responding to ARD.
If I can set it up as a package, then I can use Task Server to "deploy" the command to machines that are not currently online. When the machines next contact the Task Server, they will be told to run softwareupdate.

Similar Messages

  • Want to create unix shell script for  Clone procedure in 11i and r12

    Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
    Thanks in advance .

    user11958935 wrote:
    Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How do i create a "shell script" as root? [SOLVED]

    Really a newbie question, i know, but any how.
    I just downloaded and installed a google-drive client and is about to set it all up. Following a guide from github.
    https://github.com/astrada/google-drive … tomounting
    "Create a shell script named gdfuse in /usr/bin (as root) with this content:"
    There were no explanation how to create a shell script. So i just want to know how du i do that?
    I assume it's really simple,  when logged in as su in a terminal, but shell script is new to me.
    I read a tutorial on creating scripts, (http://linuxcommand.org/wss0010.php) but  dont know how to create the actual file. e.g. if i open leafpad and try to save it in the /usr/bin i presume it's not as root. Or shall i open thunar as root and do it that way?
    Last edited by dockland (2015-06-19 21:39:44)

    There's seldom need to run graphical application as root. For editing as root, it's best to stick to a text-based editor.
    One of the first hits on a ddg search for 'how to create a shell script' was http://www.linfo.org/create_shell_1.html
    Last edited by karol (2015-06-19 21:57:23)

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • How to use "do shell script" when Terminal replies with a prompt?

    Hey all,
    I'm wondering how to properly use "do shell script" when Terminal replies with a question? In this example, I'm building a small tool in AppleScript that will auto-update the Android SDK via command line prompts. The problem is when I tell it to update all ("update sdk --no-ui"), I need to accept licence agreements before it continues, and the amount of licence agreements brought up is different every time.
    So, basically, I'm wondering how to handle a case where "do shell script" encounters a case where Terminal would normally need a user's response to?
    Thanks,
    Behn

    If it is variable number of prompts that is a problem.  Look around hd and figure out how many prompts there will be. Ask around android forum for a bash solution. There are some test case apps that will let you put conditionals on output from running programs.
    # traditional way.  Pipe output to command.
    do script "echo 'ok' | update sdk --no-u"
    Here is the preferred way of getting administrator privileges.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set unixDesktopPath to POSIX path of "/System/Library/User Template/"
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "sudo ls -l  " & quotedUnixDesktopPath with administrator privileges
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Running a simple shell script

    Not being a regular user of terminal on OSX, I have managed to forget how to run a simple shell script. The purpose of the script is to rename a set of files contained in a specific directory. Here is a sample of the script I wrote some time back:
    mv product_22.jpg 080688614423.jpg
    This command repeats for each file I need to rename. My recollection is that I simply put the actual script text file in the same directory as the images to be renamed and drag the script file into a new terminal window and hit enter to run. When I try this however I receive the following error:
    ord2: Permission denied
    Can anyone help me out here? I'm running 10.2.8. I seem to beforgetting a critical step somewhere along the way.
    Thanks
      Mac OS X (10.2.x)  

    Have you set the execution bit for the script? When not, use: chmod 755 script.

  • How to create power shell script to upload all termset csv files into the SharePoint2013 local taxonomy ?

    Hi Everyone,
    I want to create a powershell script file
    1) Check a directory and upload all termset csv files into the SharePoint local taxonomy.
    2) Input paramaters - directory that containss termset csv files, Local Termstore to import to,
    3) Prior to updating get a backup of the existing termstore (for rollback/recovery purposes)
    4) Parameters should be passed in via XML file.
    Please let me know how to do it.
    Regards,
    Srinivas

    Hi,
    Please check this link
    http://termsetimporter.codeplex.com/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Create a simple shell script thing?

    Hey,
    I'm trying to make a simple command script thing. I have no idea what I'm doing though.
    I just want a file that I can click and open in terminal that will:
    1. ssh [email protected]
    2. auto enter the password (if this is really complicated then it can be skipped)
    3. cd public_html/blog
    4. svn up
    5. like 5 sec delayed exit (if possible)
    I'm thinking this is a really easy thing to do for someone who knows what they're doing.
    So can someone tell me what I have to do to make this? I would really like to learn how to do this.
    Thank you
    Last edited by FLCLFan (2008-10-12 20:06:20)

    Instead of making a script, you could just as well write a bash function for this and put it in your .bashrc.
    something like this:
    update-svn-on-domain ()
    ssh -t [email protected] 'svn up public_html/blog'
    when the svn up is done, the ssh command stops, and the function returns.  it does everything you want except auto entering passwords. 
    i strongly discourage auto entering passwords.  i recommend you to setup rsa key authentication

  • Simple shell script utility to copy abs tree for build

    Hi,
        I'm learning shell script and decided to make a simple script to copy the folder i want from /var/abs to
        a new folder so i can build the package. here it is: (remember, i'm new to shell scripting, if you know a better way to do it, you can modify my script
        and post here a better solution, so, i (and others) can learn with my errors)
    #!/bin/bash
    #Looks for the abs tree of the software you want
    #and copy it to your build path
    ABSTREE=/var/abs
    echo -n "What software do you want? "
    read absname
    result=$(find $ABSTREE -name $absname)
    for i in $result; do
    echo -n "$i, is this what you want? [y/n] "
    read opt
    if [ $opt = "y" ]; then
    echo -n "Copy to... "
    read buildpath
    relative=${i#$ABSTREE}
    absolute=$buildpath${relative%$absname}
    mkdir -p $absolute
    cp -r $i $absolute
    echo "$i successfully copied to $absolute"
    exit 0
    fi
    done
    exit 1

    spoonman wrote: mkdir -p $absolute
    cp -r $i $absolute
    echo "$i successfully copied to $absolute"
    You are assuming `mkdir` and `cp` were successful. You should test them to make sure, and exit with failure if not:
    mkdir -p $absolute || exit 1
    cp -r $i $absolute || exit 1
    echo "$i successfully copied to $absolute"
    You could also include your own error message, but mkdir and cp would throw their own if something fails...
    mkdir -p $absolute || { echo "mkdir failed"; exit 1; }
    cp -r $i $absolute || { echo "cp failed"; exit 1; }
    echo "$i successfully copied to $absolute"
    Another way is to use `set -e` which will exit the script on any failure without explicit testing:
    set -e
    mkdir -p $absolute
    cp -r $i $absolute
    set +e
    echo "$i successfully copied to $absolute"

  • Trying to create a shell script to cut/paste files in finder. Help needed.

    I'm trying to create an automator shell script to cut/paste. It'll function exactly like copy/paste. i.e. I'll just copy file/files with command+c like always, but then I'll create an automator which uses the "mv" terminal app to move the files which works exactly like cut paste.
    I need some help since I don't know the syntax for creating shell scripts.
    What I did so far is to do it in automator with Apple Script which goes like the following:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    tell application "Terminal"
    do script with command "mv \"" & input & "\"" & thePath in window 1
    end tell
    return input
    end run
    This gets the copied file path from clipboard before, as input, and then recognizes the active finder window as thePath so then executes the mv command for the input file to the thePath window.
    It doesn't work as expected since it connects both file/window paths into a single path instead of leaving a space between them so the mv command can't recognize two separate paths.
    What's the correct syntax for that line
    do script with command "mv \"" & input & "\"" & thePath in window 1
    to leave a space between input and thePath under the mv command?
    Also this requires the terminal app to be open in the background.
    After I get this to work I want to do the exact same thing using shell script within automator, so I won't need Terminal to be open all the time.
    And the next step will be to cut/paste multiple files/folders but that should be easy to do once I get the hang of it.

    Try using:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    do shell script "mv \"" & input & "\" " & thePath
    return input
    end run
    (45977)

  • SCCM: Application deployment vs Package deployment with requirements and prerequisits.

    Hey,
    My organization is in the process of implementing a new remote networking solution for all employees, however some employees require additional software vs others. What I am trying to find out is if there is a way to have one package with supersedes and
    requirements that we can use to do a massive deployement. 
    Here are the different scenarios with order of installation:
    Financial group Desktop:
    1.Install New solution
    2.Install Configuration
    3.Install Token Authentication 
    (nothing crazy)
    Financial Group Laptops
    1.Install Token Authentication
    2.Install New Solution
    3.Install COnfiguration
    4.Un-uninstall Old Solution
    5.Un-install Tunnel Guard application (requires a reboot, that's why it's last). (this is the application that would be deployed with requirements to go back up the chain of supersedes (meaning, deploy 5, but do 4, when 4 is triggered, it does 3 first, etc...)
    All other laptops
    1.Install New Solution
    2.Install COnfiguration
    3.Un-uninstall Old Solution
    4.Un-install Tunnel Guard application (requires a reboot, that's why it's last).(this is the application that would be deployed with requirements to go back up the chain of supersedes (meaning, deploy 4, but do 3, when 3 is triggered, it does 2 first, etc...)
    Because of the different requirements, is there a way to have one deployment with multiple deployment types to say based off:
    1. Computer types (we have a naming convention that identifies laptops and desktops.
    2. Only install certain pieces of software (Token validator in this case if financial application is detected on the machine).
    Or should I create different applications for each case with different collections or go with 3 different packages and collections with install this package first set in the package deployment
    Thanks for your help.

    The problem is the last uninstall, because it's not applicable to all machines. That means that if you would deploy that with all it's dependencies, it wouldn't do anything on the desktops as it's not applicable to them.
    In this case, if you want to use one deployment, the easiest solution is a task sequence. That way you can target everything in one time and still build some logic to prevent some (un-)installs.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Simple Shell Script Question.... [java related]

    Hey guys! This is my first post, as im new here :S
    I have a simple problem for a big program.
    We have a .sh to install it, but when I run the .sh in terminal like i should, It says the class is not found. I believe it has to do with the syntax, as the person who made it is not a linux pro. I don't know MUCH about shell scripts, but I'm pretty sure I know where the error lies.
    Our Script:
    java -classpath ./:./jars/tools.jar:./jars/nexus.jar impsoft.nexus.installer.Install
    chmod a+x run.sh compile.sh
    The Error:
    Exception in thread "main" java.lang.NoClassDefFoundError: impsoft/nexus/installer/Install
    What I think the problem is:
    ./jars/nexus.jar impsoft.nexus.installer.Install
    Thank you for ALL of your help!

    Hi Justin,
    Have you tried running the lines from the command line?
    The second thing you may want to try is changing the relative directory for the jar file from a relative one to a fixed directory. From the error, it appears that the install program is running but it is not able to locate a library mentioned in the program (which is probably the jar file listed in the classpath).
    Hope that helps.
    J. Haynes
    Denver

  • Shell Script to send email with .txt file as attachment

    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!

    978334 wrote:
    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!http://bit.ly/XHfSCz
    https://forums.oracle.com/forums/search.jspa?threadID=&q=sendmail&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Simple shell script issue

    Hi,
    I have an issue with following shell script:
    #!/bin/sh
    env | while read VAR; do
    RIGA=$RIGA"\""$VAR"\";"
    done
    echo $VAR
    echo $RIGA
    exit 0
    Why the last echo commands (echo $VAR and echo $RIGA) don't give me any result? Why $VAR and $RIGA are empty?

    From what I understand, anything to the right of a pipe is run in a sub-process in non POSIX shells, which runs in it's own environment. Variables changed inside ta sub-shell are not changed at the parent process.
    Perhaps using ksh instead of bourne shell will work, or you could try input redirection rather than using pipe command. e.g.:
    while read VAR; do
    RIGA=$RIGA"\""$VAR"\";"
    done < $(env)
    echo $VAR
    echo $RIGA
    exit 0
    Edited by: Dude on Dec 15, 2010 6:11 AM

  • Simple shell script problem...

    I am trying to get a list of directories on a remote machine, compare them with the directories on the local machine and copy any that dont match on the local machine to a backup folder. Heres my code but i am a newbie and i cant get my shell script to read from a file. The for loop never executes so i am guessing i am not reading the file correctly - see below.
    #!/bin/ksh
    ssh -l removeserver 192.168.xxx.xxx ls /remote/server/directory/ > /store/remote/directory/listing/motapp1files.txt
    newfile=''
    $newfile < /store/remote/directory/listing/motapp1files.txt
    for file in $newfile;
    do echo $file
    if [ ! -d local/machine/directories/$file/ ]; then
    echo "this folder doesnt exist on on remote server "; echo $file;
    fi
    done

    Re-inventing the wheel perhaps. Look into rsync. Great program!
    I used it in FreeBSD to do a very similar task.

Maybe you are looking for