0
votes
0answers
54 views

Trying to create a pre-revprop-change for editing message on commit

I'm trying to add a hook to svn so that you can edit messages on commits. But whatever I do I get the same error message. Revprop change blocked by pre-revprop-change hook (exit code 255) with ...
1
vote
1answer
63 views

Email administrator when a duplicate IP is found on the network

It was suggested that I ask this question on serverfault. I know this is a bit of a custom requirement but I was hoping someone currently has (or can put together) a script that checks for duplicate ...
1
vote
2answers
176 views

How to set ip address permanently

This might sound a little strange, but I try to achieve to set up an ip address permanently in Ubuntu using the command line, but not an editor. My idea is to provision servers and just type in the ...
0
votes
1answer
383 views

Is it possible to auto update php.ini via a bash script? [closed]

I'm trying to write an install script and i need to change the sendmail line in php.ini but I want to do this automatically at the moment I'm doing this manually: sudo nano ...
0
votes
2answers
106 views

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 ...
4
votes
1answer
742 views

Trying to monitor file/folder changes on the server and send notification. What am I dong wrong?

I am trying to make a script to monitor a directory of the EC2 webserver I am managing. I found inotify and tried to make the following script but upon trying it nothing happened. #!/bin/sh while ...
0
votes
2answers
2k views

Good pratice to create script to start/stop/restart service?

I was wondering what is a good pratice to create a good script to start/stop/restart some service. I will try to make myself more clear, ok ? Nowadays, I do something like this: let's say I would like ...
0
votes
2answers
299 views

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 ...
0
votes
1answer
192 views

perl dbd::mysql cant install (from asterisk perl script)

I ve got problem with perl script for asterisk. I've investigate that when tping use DBI; -- all statcks. After that i added: my @driver_names = DBI->available_drivers; foreach ...
1
vote
2answers
129 views

Ubuntu - executable file - variable assignment throwing error on script run

I am trying to run a small script - test - on ubuntu box. It is as follows: var1 = bash var2 = /home/test/directory ... ... <some more variable assignments and then program operations here> ...
3
votes
1answer
1k views

How can I use SetUID on a shell script to run as a non-root user?

Our company's server is running Ubuntu 12.04 (Precise) and Apache 2. We have a custom, internal web application installed. I have a bash script which pulls any updates to that app from source control ...
3
votes
2answers
462 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?
1
vote
1answer
303 views

Diaspora server auto start when system start up in ubuntu

To start Diaspora sever, always need to cd to the /home/diaspora, then run ./script/sever My server(Ubuntu 11.10) everyday restart. I want to configure the server(Ubuntu 11.10) to allow diaspora ...
2
votes
1answer
39 views

How can I log all changes to Ubuntus packaging system?

I have an ubuntu box and I want to get/log all changes to the packaging system (apt/dpkg) so I can reproduce them on an other machine. My goal is to extract an update script to reproduce the same ...
2
votes
4answers
320 views

convert bat to sh

I am totally new to scripting in linux...so i want to port some simple window bat files to ubuntu. First file is easy setenv.bat set ANT_HOME=c:\ant\apache-ant-1.7.1 set JAVA_HOME=c:\java ...
0
votes
1answer
168 views

Send commands to EC2 Ubuntu instance

I create an instance automated with the AWS SDK and want some shell scripts to be executed by the box once it boots up the first time. BUT only on certain conditions, so I cant place this scripts in ...
0
votes
1answer
147 views

Ubuntu using screen to control a Java server

I have a shell script that makes a backup of my server files before starting it. However I wish it to instead of just running it open a new screen session and then start it from there. Once its ...
7
votes
1answer
7k views

How to start tomcat in remote debug mode under Ubuntu 10?

I'm getting crazy to set up Tomcat in remote debug mode under ubuntu 10. Basically I added this to /etc/init.d/tomcat6 (at the beginning): JAVA_OPTS="-Djava.awt.headless=true -Xmx256M -Xdebug ...
5
votes
3answers
3k views

Ubuntu Upstart script hangs on start and stop

I have an upstart script that will start a custom jetty server. When I do sudo start [myservice] nothing happens. Subsequently, sudo status [myservice] show it as: [myservice] start/killed, process ...
0
votes
1answer
738 views

What is preventing Amazon's Route 53 from picking up my EC2 instance tags?

I have a number of Amazon EC2 instances, all running Ubuntu, which I'd like to configure to use Amazon's Route 53. I setup a script, following Shlomo Swidler's article, but ran into script-related ...
0
votes
2answers
224 views

Attempting to update Amazon Route53 using a script, but domain is not being updated

I have several Amazon EC2 instances, running Ubuntu 10.04, with which I'd like to use Amazon's Route53. I setup a script as described in Shlomo Swidler's article, but I'm still missing something. ...
2
votes
3answers
641 views

How to start a s3ql script automatically on boot?

I've been experimenting with s3ql on Ubuntu 10.04, using it to mount Amazon S3 buckets. However, I'd really like it to mount them automatically. Does anyone know how to do that? Solution: Thanks ...
0
votes
2answers
70 views

Looking for a specific FTP server [closed]

Hey I am looking for an FTPD that I can run on ubuntu 10.04 that I can automate user creation and deletion via php scripts. I also need to be able to point the users to a specific ftp directory ...
0
votes
3answers
523 views

execute script when a hardware is plugged in

How can I tell my Ubuntu installation to execute some scripts when I connect a specific hardware? For example: I have an external eSATA disk. When this (and only this) disk is plugged in, my notebook ...
2
votes
3answers
2k views

Ubuntu/Debian/OpenSSH: Run (system) script on SSH login and/or logout

On Ubuntu, I'd like my OpenSSH server to start a script whenever a user logs in using SSH, ideally passing the host name or IP, as well as the user name. Additionally I'd like it to run a script, ...
0
votes
2answers
419 views

Bypass “Package Configuration” Screen

I'm trying to setup my Ubuntu image via a script over on AWS and I can't get rabbitmq-server to install. It throws a Package Configuration screen that simply has one option (hit OK). How can I ...
0
votes
3answers
2k views

Scritp to wait for few seconds before executing next line

I have a script which copies(scp) .war file to tomcat's webapps and the .war file extracts creating a folder under webapps directory on a ubuntu system. My next line of the script is restarting the ...
0
votes
3answers
121 views

Task on server shutdown and up

Which is the best way to run a script upon server restart and when server is up again? e.g. When services will be unavailable: irc_notify "Server is going down" when all services are available: ...
0
votes
6answers
644 views

Automate switch user in script

I have to write a script on ubuntu and some commands require root privileges. The script is full of normal linux commands. Is it possible to write a switch user(su) script that automates the password ...
0
votes
1answer
525 views

ubuntu startup script problem

i have this startup script under fedora running fine #!/bin/sh -e export P4JOURNAL=/var/log/perforce/journal export P4LOG=/var/log/perforce/p4err export P4ROOT=/var/local/perforce export P4PORT=1666 ...
3
votes
3answers
4k views

bash script with permanent ssh connection

I use a bash script which runs /usr/bin/ssh -f -N -T -L8888:127.0.0.1:3306 serveradmin@34.324.234.23 However, when I run the bash script, it waits.. I see the connection coming up but the script ...
0
votes
1answer
435 views

Script fails when run from cron

I have some embedded machines which are on an unreliable connection which network manager unfortunately isn't handling well. Currently I need to check for connectivity and then restart network manager ...
4
votes
2answers
2k views

How To Shutdown Ubuntu Automatically X Minutes After Starting Up?

How would one automatically shutdown an ubuntu OS 30 minutes after it was turned on? Or 15 minutes after it was turned on? Etc? I tried creating an init.d script like so: shutdown -h +5 But my box ...
3
votes
3answers
561 views

Write shell script that can only be run by a sudo user in Ubuntu

I'm writing a shell script that is supposed to be run by users only in sudo user list, what's the appropriate way of doing this? what I'm thinking is in the shell script, try to create a dummy file ...
0
votes
3answers
313 views

Shell Scripting - How To Replace Lines

Ubuntu 9.10 Hi Guys, I want to create a script that will automatically update a single line in an .htaccess file. Could someone please point me to some instructions for creating a basic "find and ...
11
votes
4answers
15k views

How to run script via SSH that doesn't end when I close connection?

I need to run script, that takes long time to execute, or I just want it to run forever. I can't just SSH to my machine, because when I disconnect it stops running. Is there any way to run script ...
2
votes
5answers
24k views

Ubuntu - dhcp server 'not configured to listen on any interfaces'

I'm at my wits end on this one; I have tried for hours to get this to work, but I'm stumped. Hope one of you can help. :-) I'm trying to get dhcp3-server to work on Ubuntu. It's installed, and ...
2
votes
2answers
4k views

Linux (Ubuntu) run script upon USB mount

I have a Ubuntu server with a external USB hard drive. I basically just want to run a script whenever the hard drive is plugged in. What would be the optimal way to achieve this ?
2
votes
1answer
382 views

Set password on Ubuntu 9.04

I need to set up a large number of local user accounts on a number of machines running Ubuntu, and I need a way to script the password setting. These machines use /etc/shadow, as is the default in the ...
1
vote
5answers
2k views

ubuntu: runing .sh files as root

How do I run a .sh script with root privileges from Ubuntu's cmd? Some scripts require to enter the password. I watn to avoid this.
1
vote
4answers
15k views

Ubuntu startup scripts

I have been getting problems when trying to create a startup script in Ubuntu 9.04. I followed this guide but it didn't work: ...
19
votes
6answers
11k views

Scripted install of MySQL on Ubuntu

I need to write a script that will build my server from a fresh Ubuntu server install. Among things like Apache and PHP it needs to install MySQL. The only problem here is that when I install MySQL ...