A form of computer programming that — in the context of system administration — lends it self well to automating tasks. Scripting is usually done in a scripting language. Such scripting languages are often dynamically typed and interpreted, as opposed to compiled languages. Examples of such ...
0
votes
1answer
31 views
pass command with stdout to a bash function
ok.. this is the deal. i have a bash script like the following. the script is only to show you what i mean .. it may look strang... but is exactly what i need.:
#/bin/bash
runcommand () {
...
-1
votes
2answers
24 views
linux script - find java process and restart it if it is more than 80% Mem High
I want to put in crontab a shell script that will monitor the java process and if it's the memory is more than 80% then I want to restart it.
can any one help?
Thanks!!
Elad.
2
votes
1answer
46 views
Error handling in Mikrotik scripts
I have RouterOS 5.14 on RB493G. I need to write script, that launches
/tool fetch ...
Execution of fetch may result in error, this is OK(URL may be sometimes unavailable). Script hangs on error. Is ...
0
votes
6answers
63 views
What does passing the -xe parameters to /bin/bash do
Exactly what the title says. I'm not having much luck finding the proper documentation to see what -xe does in the following use case:
#!/bin/bash -xe
what do those parameters do and where it is ...
1
vote
0answers
37 views
Documentation for bash arguments [closed]
Possible Duplicate:
What does passing the -xe parameters to /bin/bash do
Where is the best place to read documentation on what parameters that are passed to bash such as -x and -e are? I ...
1
vote
1answer
42 views
Powershell: Wanting Exchange statistics and running into (output) limitations
I am trying to gather mailbox statistics for all mailboxes in our organization, exporting it to an Excel /CSV file. This is the code I came up with /gathered so far:
Get-Mailbox -ResultSize Unlimited ...
1
vote
1answer
13 views
I am trying to automate an install with Active Directory to a server core box?
I am trying to automate an install with Active Directory to a server core box?
I assume I need to set up a script. Any ideas on how to go about this.
0
votes
0answers
10 views
add certificate to all files in EFS-folder with script
I try to set up collective access to EFS-folder. I want to add certificates of all users to all files in folder. Is it posible do with using powershell scripts or some another way?
Thanks.
0
votes
2answers
39 views
Cron daemon's status check on production server
I have a script which need to be run as cron job.
In the staging environment i could run the script as a cronjob. but in the production environment it is not working,
so i checked whether cron ...
1
vote
1answer
36 views
Easy way to shorten up bind9 zone config?
Is there an easy way to put some kind of variables into bind9 zone files?
Lets say i have a bunch of different zone-files, and i would like to define my ip's in one config file. So that i can make ...
-1
votes
0answers
31 views
manage python scripts on server [closed]
I have a large collection of python scripts (crawlers) and I want to them to be running on a linux server, what is the best tools to manage python scripts online (which one is running which is not)
1
vote
2answers
47 views
changing directory in bash script
I have the following script:
cd "/usr/local/bin/"
/sbin/startproc ./program1
I have a license in the /usr/local/bin directory and if the program isn't started from there
it won't launch ...
2
votes
1answer
29 views
Are there any good open source developer machine setup scripts for windows/c# development?
I've used thoughtbot's laptop setup script to setup my mac for ruby develpment in the past.
Is there anything similar out there for windows/c# development? Something that sets up IIS, installs visual ...
0
votes
4answers
60 views
Weird init script issue with corosync
This probably has a simple explanation, but I certainly can't think of it.
I've got corosync installed (via yum), with it's default init script. Something is strange on this particular CentOS ...
1
vote
4answers
28 views
Stripping “extra spaces” in du -sk for bash script?
I am trying to use du -sk to get the size of two folders
dirsize_temp=`du -sk /folder/path/here`
and then an if statement to compare the sizes. The only issue is that when you run the command, it ...
0
votes
1answer
52 views
Syntax error near unexpected token `fi'
I have been trying to write a while loop bash script that will check the size of two directories, and echo that out to a text file in the www folder. After my while loop stubbornly refused to work, I ...
2
votes
1answer
67 views
Grant MODIFY on “All Subfolders and Files” with icacls, but only give Read to top level folder
One of our Windows servers that has some user folders on it has some pretty screwed up permissions. What I want it for SYSTEM and Domain Admins to have full control of all folders. I want the users to ...
0
votes
2answers
74 views
Script to delete Shortcut on each user's desktop
I'm looking for a script to remove a .lnk file that was placed on every user's desktop. I installed a program on a terminal server that put a .lnk file on every user's desktop, rather than putting one ...
0
votes
3answers
58 views
In a shell script, perform different actions depending on the file on a another server (web accessible)
I've been having trouble with firewalls lately on a few different servers. And im wanting to create a script that will run once every hour or so, and check a file on an external server and execute the ...
1
vote
1answer
80 views
Verify who has Bitlocker key backed up via PowerShell?
We currently use Bitlocker on our laptops here at work. The helpdesk are responsible for backing the Bitlocker key up to AD when they build the system. We ran into an issue recently where a user had ...
3
votes
2answers
52 views
Ubuntu: How to set up an init script that only runs on the first boot?
I need to install an init script that only runs on the first boot after it's installation. How can I accomplish that on Ubuntu?
0
votes
3answers
42 views
init.d tomcat6 script
I "installed" tomcat on ubuntu by just unzipping it. Is there a standard script I can use for /etc/init.d/tomcat? Or do I need to create one?
Currently I have created one that works, but I didn't ...
0
votes
0answers
43 views
Add a SQL user similar to a current user via PowerShell?
I'm slowly but surely perfecting a new user script. As it is, my script will do everything to add a new user to our domain, except one thing. We have an in-house program, webpage front end that ...
1
vote
1answer
57 views
Is it possible to change a Windows hostname (NetBIOS name) using a script?
How can I change the hostname of a Windows server using a script?
Doing this on a Linux server is very straightforward (change a couple file entries, and run the hostname command), but I don't know ...
1
vote
1answer
35 views
Scripting postgres synchronization--is this secure?
I have written a script to synchronize (recreating from scratch) a production database with a development database, and I wanted insight into potential security flaws/issues, the script is posted ...
1
vote
0answers
21 views
Adding a user to BES via Script?
I am looking for a way to add users to BES using a script to help automate new user creation process. Is this possible with using any of the resource kits from BlackBerry, or other methods than using ...
1
vote
4answers
62 views
Launch Linux Script remotely from Windows
I have an rsync script that runs on one Linux server to synchronize files with another Linux server. Is there a way to launch a script on one of the Linux machines without actually opening an ...
0
votes
1answer
91 views
how to rdiff-backup with list increments
I have already created nfs server and client for backup web server and cms server like at http://www.myee.web.id/2012/04/nfs-server-for-backup/
Then I installed rdiff-backup, for backup I running ...
2
votes
1answer
72 views
Self watchdog script
Has anyone written a self-watchdog script and can share the way it was resolved?
I have DD-WRT on one of the routers and can make only one startup script. The problem is doesn't get run. If I log on ...
3
votes
3answers
80 views
Email to run a bash script
I have a bash script to restart a service that runs every 3am to guarantee that the service isn't crashed when users require it. However, I need to provide a simpler way for my partner (that isn't ...
0
votes
2answers
116 views
VBScript with ADsDSOObject no longer working after move to Server 2008 R2
we recently moved some scripts from a 32 bit Windows 2008 server to a new Windows 2008 server R2 64 bit machine. Now we have some trouble with a few VB Scripts.
Let's take this one for example:
Set ...
0
votes
0answers
22 views
Script to Detect A Webcam in Windows?
I need to determine how many computers out of 15,000 have webcams either attached or integrated into them. Is there a way I can script this? I've been searching all over the net and can't seem to find ...
0
votes
1answer
53 views
Automatic alert/notification of calendar items added to Public Folders
We currently use Public Folders with Exchange 2010. We have a series of shared calendars throughout the organization. Some of the items posted require us to set up devices (video conferencing for ...
2
votes
3answers
219 views
How to automate DNS server reconfiguration for TCP/IPv4 and TCP/IPv6 in Windows 7?
I need to switch Internet Protocol Version 4 (TCP/IPv4) and Internet Protocol Version 6 (TCP/IPv6) settings for DNS server configuration from "Obtain DNS server address automatically" to hard coded ...
2
votes
3answers
143 views
Detecting upload success/failure in a scripted command-line SFTP session?
I am writing a BASH shell script to upload all the files in a directory to a remote server and then delete them. It'll run every few hours via a CRON job.
My complete script is below. The basic ...
1
vote
1answer
76 views
Can I still < CopyProfile > without the /Generalize arg to the default Profile?
The title is self explanatory. I had to remove the /generalize option when going from my sysprep to OOBE but that has now broken my copy profile.
I have read multiple places, that /generalize is ...
2
votes
6answers
222 views
email output of powershell script
I found this wonderful script that outputs the status of the current DFS backlog to the powershell console. This works great, but I need the script to email me so I can schedule it to run nightly. I ...
0
votes
1answer
28 views
System for Information Screens in a Makerspace
(Not completely a programming thing, hence not on SO, but more system related so thought SF could help, sorry if I'm missing a better place)
We've recently started a Maker/Hackerspace in Northern ...
3
votes
5answers
133 views
How do I read multiple lines from STDIN into a variable?
I've been googling this question to no avail. I'm automating a build process here at work, and all I'm trying to do is get version numbers and a tiny description of the build which may be multi-line. ...
1
vote
2answers
275 views
How to import a text file into powershell and email it, formatted as HTML
I'm trying to get a list of all Exchange accounts, format them in descending order from largest mailbox and put that data into an email in HTML format to email to myself. So far I can get the data, ...
0
votes
2answers
149 views
How to add a shutdown script (not by using gpedit.msc or active directory)?
I have created a script I want to deploy on my XP workstations as a shutdown script. I know I can add my script as a shutdown script with the UI (gpedit.msc), but I want to automate the deployment of ...
2
votes
4answers
114 views
bash : “set -e” and check if a user exists make script exit
I am writing a script to install a program with bash, I want to exit on error so I added "set -e" in the beginning of my script.
The problem is that I have to check if a user exists inside of my ...
2
votes
2answers
39 views
Powershell: Consistent modules accross all servers/workstations
Whats the best way to get consistent modules across our servers and workstations. To put it another way: I want to be able to write a powershell script and have it run on all machines meaning each ...
0
votes
0answers
269 views
FortiClient SSL VPN Command Line Options
We had recently had a vendor switch to a fortinet firewall. We were given the FortinetSLVPNclient (version 4.0.2148) to use. This has some simple command line switches that allow you to connect from ...
3
votes
1answer
175 views
After adding new user to AD via Powershell script, have to reset password?
I've been slowly working on a script that will do everything I normally do for a new employee when they start. So far it all seems to be fine except one thing. Here's what I have:
Loads Quest ...
3
votes
3answers
81 views
simple nagios script failing
What is wrong with the following if-then-else? I never can hit the else.
if [ $result > $value ]; then
echo HEALTH: OK. Result is $result Value is $value
exit 0
else
echo HEALTH: ...
0
votes
2answers
74 views
Use number of downloaded file in wget as variable in bash script
Can I get the number of downloaded files with wget -r and use that as a variable? I want to write a script that runs multiple wget commands in it (using -q so i can control output) and then at the ...
0
votes
1answer
34 views
How can I retrieve statistics from my ghost cast server?
I have a GhostCast server running for deploying images. I would like to have each ghost cast session to write to a file ( can be multiple text files or append to one file already there ) statistics. ...
1
vote
1answer
58 views
trigger script on postfix delivery errors
I'm trying to get postfix to run a script on soft (4xx) and hard (5xx) delivery errors, but I'm not sure where to start.
If I understand things correctly, I could insert (pipe-based) filters in the ...
1
vote
1answer
77 views
Create new AD account similar to a current user
I've been working on a PS script that will prompt me for several criteria, then create an Exchange/AD account. It's all going well, but I was thinking, is there a command that will create a new user ...