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

openvpn client - dynamic server/proxy ip

We're running an openvpn server and let some clients connect to the vpn server through a socks proxy. This already works. Our problem is now, that we need to change the ip address of our proxy frequently (once every 2 - 3 days) and can't deliver the…
wullxz
  • 1,073
  • 2
  • 16
  • 29
0
votes
1 answer

What is the easiest way to obtain a script-driven hot failover system?

I need to reconfigure a prod env to provide hot failover for a db driven web app written in Perl that is currently running on an Apache HTTPD server, on a Linux OS. The app is not designed to run in a cluster. Thus, if 2 instances of this app are…
bogdan
  • 65
  • 11
0
votes
1 answer

powershell script to move backup files

I want to zip sql bakup files and move from one directory to to another directory within a system using powershell 1.0 can you help me since am a beginner
0
votes
1 answer

Powershell error when adding filepath

The script looks like this: $searchOU='ou=Servers,dc=mydomain,dc=NET' Get-ADComputer -filter * -SearchBase $searchOU | Foreach-Object { $server = $_.Name ([ADSI]"WinNT://$($_.Name)/Administrators").psbase.invoke('Members') | …
Sabeltiger
  • 1
  • 1
  • 3
0
votes
1 answer

How to differentiate between start/stop/status in upstart

upstart has post-start, post-stop, etc... and script. as i understood, the script part gets executed on initctl start X or initctl stop X or initctl status X. so how do i know in script which one was called - start or stop?
b0x0rz
  • 101
  • 1
  • 1
  • 5
0
votes
1 answer

Running Norton Internet Security 2009 from command line

I'd like to be able to run Norton Internet Security 2009 from the command line and have the status of that scan set the errorlevel in Windows. With older versions, you could so something like this: navw32 /S /NORESULTS PathToScan The "2009" version…
Ken
  • 103
  • 4
0
votes
2 answers

Ubuntu unattended upgrades to run at a certain time

I'm trying to work out the best way to run unattended upgrades every Thursday at 3am but can only see a way to run this weekly but not a given time. I thought of one way would be to have a script that is called by cron on Thursday at 3am The below…
Grimlockz
  • 325
  • 1
  • 2
  • 11
0
votes
1 answer

Crontab start a screen

I started a screen by shell script in crontab, when I entered the screen, the left side became "sh-4.1#". While I runed the script directly, it was nomal with "[root@localhost data]". What happened? Shell script: #!/bin/bash cd…
Brighter
  • 3
  • 2
0
votes
2 answers

Script to check server for WordPress installs and report version information

I'm looking for a script that can be run on a linux server that will find all WordPress installs and report their versions, or report if a version is out of date. I've googled for something and it looks like Fantastico and Scriptalicious do this,…
Jmichelsen
  • 113
  • 6
0
votes
3 answers

Remove a sentence which starts with word "mark" and ends with ";"

I am having 100's of files that contain sentence that starts with mark and ends with semicolon(;). eg: mark is driving a car; i need to remove every sentence starts with mark and end with ";" How to do this using sed or simmilar tools. i have…
ananthan
  • 1,510
  • 1
  • 18
  • 28
0
votes
2 answers

howto structure a version control repository of sys admin scripts

I think by now all sys admins have started to amass a large collection of scripts for kinds of scenarios, user management, server builds, incident mitigation tasks, app deployment. and like most sys admins I've got these scripts kept in a bunch of…
Preflightsiren
  • 457
  • 2
  • 8
0
votes
1 answer

Get directory of a symlinked script

I have to determine the directory of a script which is symlinked. /usr/local/src/myscript/myscript.sh /usr/local/bin/myscript.sh (Symlink to the one above) A cronjob executes /usr/local/bin/myscript.sh. Inside myscript.sh I am trying to determine…
gorootde
  • 226
  • 1
  • 3
  • 9
0
votes
1 answer

How to check authenticated access to MS Windows machines in a batch

I am checking with nessus the vulnerability status of MS Windows machines on a network I do not manage for which I have received appropriate domain-level credentials. It works but the results I get seem to suggest that not all the machines I access…
WoJ
  • 3,607
  • 9
  • 49
  • 79
0
votes
1 answer

IIS script privileges with powershell

I've created a script for most of the functions I need when creating a Site for my IIS, however, there is still one thing missing. Namely, I can't seem to find the commands for setting script privileges on a Site. I want all script rights but no…
Andtalath
  • 3
  • 3
0
votes
1 answer

Virtualbox hook into host machine

I want to write a script that can add new hosts to /etc/hosts from within a virtual machine as I use VMs for web development and need to set up virtualhosts that are accessible from the host machine. Obviously I can do this manually, but where's the…
John Hunt
  • 428
  • 3
  • 10
  • 20