Questions tagged [scripting]

A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

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 languages include PowerShell, Perl and Bash.

1826 questions
0
votes
1 answer

Tracking down dovecot IMAP user bandwidth usage

One of my customers is using massive amounts of bandwidth, it appears to be related to IMAP and not their actual website. There is a logfile /var/log/maillog which logs each IMAP connection and the amount of bytes sent/read to the client: I'm trying…
enochroot
  • 3
  • 3
0
votes
1 answer

Reboot a server and sign into a program

I have a client who is a medical clinic and their main server, running server 2008 r2, has a program that shuttles labs from their lab vendor to their EMR/EHR. I am currently automatically rebooting all the Is there a way for the server to reboot,…
msindle
  • 605
  • 8
  • 26
0
votes
0 answers

Automated Logon with Macro backup script

I'm having some issues with an automated backup macro script I've written using Autohotkeys. My specific issue is that I need the script to run on a Windows based server at a given time during the night and run the macro in a Windowed environment.…
0
votes
2 answers

Command line adding a printer with duplex and fax enabled

We have an OCE Imagistics cm2520 unit, a big copier that does fax and duplex printing. Currently I'm trying to have our XP workstations print without using a Windows print server, but just using the copier's built-in print server. From this page…
Kev
  • 984
  • 4
  • 23
  • 46
0
votes
1 answer

Using Powershell to Create Exchange Contacts from a .CSV file

What I would like to do is use a Powershell script to create Contacts within a certain folder in Active Directory from a .csv file. This script should allow me to create the first part of an email address based on the information entered in the .csv…
0
votes
2 answers

sed regexp for replacing xxx in define('DB_PASSWORD', 'xxxx');?

I'm looking for a regexp to quickly replace the password inside the following wp-config file, like so: define('DB_PASSWORD', 'xxxx'); Now the config file has many defines, so it essential to only replace the DB_PASSWORD parameter. I also don't know…
Roger
  • 800
  • 1
  • 6
  • 17
0
votes
1 answer

Windows Login straight to Terminal Server

Essentially I'm looking for some way via batch (or potentially powershell, but win XP machines so ideally batch) to open up a RDP connection to a LAN based Terminal Server upon a user logging into a machine. Ideally it would involve some (maybe…
PnP
  • 1,684
  • 8
  • 39
  • 65
0
votes
1 answer

Script to move Maildir contents to its parent dir but for multiple folders

I totally suck at Bash/Python/Ruby/Perl Scripting (need to practice/learn some more) so I'm asking for a little help :-) I need to move about the contents of about 60 Maildirs to their parent folder and rename that parent folder too all on a Linux…
Samuel Jones
  • 228
  • 4
  • 13
0
votes
1 answer

Auto-restart "screen" script not working

I'm looking over a script that would actually be restarting game-servers in case they crash. The game-servers are actually started in a screen session through a control panel. They have to be restarted by killing their respective screen session and…
Asad Moeen
  • 437
  • 3
  • 11
  • 22
0
votes
1 answer

Script to rename home folder from a name to an assigned number

I am looking to rename some home folders within AD to and card ID number for my users. i want to eliminate having to manipulate a home folder for a user when the name changes so we are going to a numbered approach. what i am looking is a script…
0
votes
2 answers

monit displays false number from my uptime script

I've wrote a script for fetch real uptime and display in monit. But I think it displays just exit error status. My uptime script is: #!/bin/sh uptime=`uptime | awk -F " " '{print $3}'` echo $uptime exit $uptime When I run it in terminal result is…
Sencer H.
  • 562
  • 1
  • 8
  • 17
0
votes
1 answer

Issue with ifconfig in a shell script (using cron)

If I execute this script manually in Debian: #!/bin/bash /sbin/ifconfig wlan0 down /sbin/ifconfig wlan0 up sudo iwconfig wlan0 essid "WLAN_NETWORK" sudo iwconfig wlan0 key myPassword sudo dhclient wlan0 It works fine. It restarts my wifi adapter…
Janus Gowda
  • 103
  • 1
  • 5
0
votes
1 answer

Backing up remote Postgres database

I have a Windows 2008 Server machine with a postgres database running on it. I'd like to back it up daily and have it sent to another machine (running Ubuntu or Windows). What's the best way to set this up?
NinjaCat
  • 576
  • 1
  • 9
  • 21
0
votes
1 answer

.bat file - Nagios v3.2 service check and start if stopped

I'm just barely getting into programming so I do apologize for my ignorance. I'm trying to create a .bat file that will check if a service is running on XP Pro. If service is running it will exit 0. If the service is stopped start service wait 10…
LbakerIT
  • 67
  • 1
  • 8
0
votes
1 answer

Changing Zone files with sed

I have this dns zone file I was unable to change the resource record type A to CNAME @ IN SOA ns1.domain.com. webdev.domain.com. ( 2006080101 ; serial 8H ; refresh 2H ; retry 1W ; expire 4h)…
Kahiye
  • 1
  • 1