08-21-2006
sorry i meant the code works on the sys admin computer on the same unix system at the uni... but isn't working on my account.
I think I need to get them to set up a new account for me which works correctly. Thanks for the help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
I'm trying to query a directory, check it's the right directory, return the results into a text file, put text file into an array and navigate the subdirectories and delete contents.
find `pwd` -type d | grep TESTINGDIR > dirList.txt
The txt file is created from the cmd-line but not in... (4 Replies)
Discussion started by: OFFSIHR
4 Replies
2. Solaris
This is a fairly complex issue. I do not have a lot of knowledge on X11. But here are the things.
I am running a program called Synergy off a Solaris server. The server sits in a remote network and can be accessed via NAT. Using Putty, I will enable X11 forwarding and launch Synergy via Putty.... (0 Replies)
Discussion started by: Leion
0 Replies
3. Shell Programming and Scripting
Ubuntu 9.10 is my linux distro
Based on forums they say that the problem is with environment .
here is my case:
login as user, then sudo -s
using this command: s3cmd put file s3://bucket >>worked!
now here is the simple script intended for testing:
#! /bin/bash
env >/tmp/cronjob.log... (1 Reply)
Discussion started by: qwerty20
1 Replies
4. UNIX for Dummies Questions & Answers
Hey guys. Hopefully this is an easy one but having reference similar problems on the web I still can't fix it.
I am doing a recursive find and replace from a script. Of course I could just run the damn thing from the command line but it's bugging me now and want to get it working.
grep -rl... (4 Replies)
Discussion started by: anthonyjstewart
4 Replies
5. Windows & DOS: Issues & Discussions
Hi All,
This command works when I type it on but when I run the batch file it doesn't..any ideas why?
attrib.exe * | find /c /v "" >filecount.txt (1 Reply)
Discussion started by: Grueben
1 Replies
6. UNIX for Dummies Questions & Answers
Greetings, I have a C-program that is made to implement a hidden Markov model on an input file. The program is very memory intensive.
I've installed it on my local server where I have an account and it compiles fine. The way they have the server set up is that you can either work... (1 Reply)
Discussion started by: Twinklefingers
1 Replies
7. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
8. Shell Programming and Scripting
OSX 10.9
I am building a script that evaluates the difference between 2 files. Here is a command that does not work transparently.
Running this command in Terminal yields great results; however when I put that line in a .sh script, I get the errors shown below. Am I doing something silly?
... (1 Reply)
Discussion started by: sudo
1 Replies
9. Shell Programming and Scripting
I have a file with two line, one is header, the other actual value:
TYPCD|ETID2|ETID|LEG ID|PTYP|PTYP SUB|TRD STATUS|CXL REASON|CACT|CACTNM|ENCD|ENC
D NM|TRDR|ASDT|TRDT|MTDT|STDT|LS|SECID|SECID TYP|SECNM|PAR|STCC|MARKET PRICE|DIS
MARKET PRICE|MARKET PRICE CURRENCY|SRC OF SETTLEMENT... (2 Replies)
Discussion started by: digioleg54
2 Replies
10. Shell Programming and Scripting
Running Xubuntu 16.04 with shell version "GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)," I have a working script that consistently renames a Chrome window:
#!/bin/sh
while sleep 1; do
xdotool search --name chrome 2>/dev/null | while read id; do
xdotool set_window --name... (21 Replies)
Discussion started by: jakefish
21 Replies
LEARN ABOUT DEBIAN
chef-solo
CHEF-SOLO(8) Chef Manual CHEF-SOLO(8)
NAME
chef-solo - Runs chef in solo mode against a specified cookbook location.
SYNOPSIS
chef-solo (options)
-c, --config CONFIG
The configuration file to use
-d, --daemonize
Daemonize the process
-g, --group GROUP
Group to set privilege to
-i, --interval SECONDS
Run chef-client periodically, in seconds
-j, --json-attributes JSON_ATTRIBS
Load attributes from a JSON file or URL
-l, --log_level LEVEL
Set the log level (debug, info, warn, error, fatal)
-L, --logfile LOGLOCATION
Set the log file location, defaults to STDOUT - recommended for daemonizing
-N, --node-name NODE_NAME
The node name for this client
-r, --recipe-url RECIPE_URL
Pull down a remote gzipped tarball of recipes and untar it to the cookbook cache.
-s, --splay SECONDS
The splay time for running at intervals, in seconds
-u, --user USER
User to set privilege to
-v, --version
Show chef version
-h, --help
Show this message
DESCRIPTION
Chef Solo allows you to run Chef Cookbooks in the absence of a Chef Server. To do this, the complete cookbook needs to be present on disk.
By default Chef Solo will look in /etc/chef/solo.rb for its configuration. This configuration file has two required variables:
file_cache_path and cookbook_path.
For example:
file_cache_path "/var/chef-solo"
cookbook_path "/var/chef-solo/cookbooks"
For your own systems, you can change this to reflect any directory you like, but you'll need to specify absolute paths and the cook-
book_path directory should be a subdirectory of the file_cache_path.
You can also specify cookbook_path as an array, passing multiple locations to search for cookbooks.
For example:
file_cache_path "/var/chef-solo"
cookbook_path ["/var/chef-solo/cookbooks", "/var/chef-solo/site-cookbooks"]
Note that earlier entries are now overridden by later ones.
Since chef-solo doesn't have any interaction with a Chef Server, you'll need to specify node-specifc attributes in a JSON file. This can be
located on the target system itself, or it can be stored on a remote server such as S3, or a web server on your network.
Within the JSON file, you'll also specify the recipes that Chef should run in the "run_list". An example JSON file, which sets a
resolv.conf:
{
"resolver": {
"nameservers": [ "10.0.0.1" ],
"search":"int.example.com"
},
"run_list": [ "recipe[resolver]" ]
}
Then you can run chef-solo with -j to specify the JSON file. It will look for cookbooks in the cookbook_path configured in the configura-
tion file, and apply attributes and use the run_list from the JSON file specified.
You can use -c to specify the path to the configuration file (if you don't want chef-solo to use the default). You can also specify -r for
a cookbook tarball.
For example:
chef-solo -c ~/solo.rb -j ~/node.json -r http://www.example.com/chef-solo.tar.gz
In the above case, chef-solo would extract the tarball to your specified cookbook_path, use ~/solo.rb as the configuration file, and apply
attributes and use the run_list from ~/node.json.
SEE ALSO
Full documentation for Chef and chef-solo is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
Chef was written by Adam Jacob adam@ospcode.com of Opscode (http://www.opscode.com), with contributions from the community. This manual
page was written by Joshua Timberman joshua@opscode.com with help2man. Permission is granted to copy, distribute and / or modify this docu-
ment under the terms of the Apache 2.0 License.
On Debian systems, the complete text of the Apache 2.0 License can be found in /usr/share/common-licenses/Apache-2.0.
Chef 10.12.0 June 2012 CHEF-SOLO(8)