I have a FreeBSD jail in which I run a server using the command:
/usr/sbin/daemon /path/to/script.py
At the moment I have to run this command every time I restart the machine and the jail starts. I'd like to have this command started from /etc/rc.
I am trying to write a rc.d script to startup the fastcgi-mono-server4 on FreeBSD when the computer starts up - in order to run it with nginx.
The script works when I execute it while being logged in on the server - but when booting I get the following message:
eval: -applications=192.168.50.133:/:/usr/local/www/nginx: not found
The script looks as follows:
#!/bin/sh
# PROVIDE: monofcgid
# R
I created a (Debian) init Script for an executable Jar file:
[...]
NAME=NameOfMyShellScript
DAEMON="/usr/share/myApp/bin/$NAME"
USER="myUser"
PIDFILE="/usr/share/myApp/run/$NAME.pid"
EXTRA_ARGS=" -c $USER --background --make-pidfile"
[...]
start-stop-daemon --start --quiet $EXTRA_ARGS --pidfile $PIDFILE --startas $DAEMON --
[...]
My init script basically just invokes start-stop-daemon which ex
I have created a subsystem file which runs java program I have created. The subsystem file resides in /etc/init.d and allows me to stop and start the service with a consistent interface (start and stop).
I need a shell script which finds files which are created 1 hour before or 1 hour after a particular file (test.txt) was created.
watch command to notify on newly created files on linux
How to modify the below command to notify on creating a new file to /usr/local/mydir/ by linux user john ?
watch -d 'ls -l /usr/local/mydir/ | fgrep john'
ie I want to continually monitor and call an another script if any new file is created to /usr/local/mydir/.
As In production I cannot go for any tool instead of shell script.
In the root of my drive there exists a folder called SourceControl that contains all the working copies of all my programming projects.
I would like to move the folder to my user directory (\Users\Me), but something about the permissions on the folder forbids me.
Hi we are using AIX 5.3 64bit
I have near about 79000 log file having naming convention like "IFTMBCSun Aug 14 07:45:00 PAKST 2011".
This naming convention was created by a script error, now we need to rename these log file by removing extar spaces and (:) colon for that we wrote below script
Code:
ls * | while read file
do
echo $file
echo "$file" | sed "s/[ \:]//g&qu
Environment
Solaris 9
I have configured the Solaris9 as NTP client in which Solaris9 is syncing the time with a windows2008 R2 Server which is runing fine. Now I want that the xntpd service should start at startup. I did this via a script.