Search Results

Search found 7629 results on 306 pages for 'tum bin'.

Page 183/306 | < Previous Page | 179 180 181 182 183 184 185 186 187 188 189 190  | Next Page >

  • Crontab - stop sending mail, special case ||

    - by 2ge
    Hi all, I need to put into my crontab small command, which is checking, if lighttpd web server is running, for some reason it hangups sometimes. So I got there: * * * * * root /bin/pgrep lighttpd || /usr/local/etc/rc.d/lighttpd restart >/dev/null 2>&1 problem is, this send me mail every minute, in the mail is number of PID of lighttpd, which is running. For other crontab job, redirection work, so I assume, when is there "||", it makes problem. maybe there should be better to rewrite crontab job, so it uses exit status of pgrep, so I can avoid "||". I am using FreeBSD. Thanks for any help, for now I disabled this job

    Read the article

  • Start Daemonised GNU Screen from script a allow calling script to end

    - by tez
    I have a script on an embedded device that calls screen to start if a user logs in via a ssh session... #!/bin/sh SCREENRUNNING=`pgrep SCREEN` if [ -z "$SCREENRUNNING" ]; then echo "Screen not running so let's start the Master session sleep 2 screen -dmS Master sleep 2 screen -x root/Master else echo "Screen is already running let's connect to existing session" sleep 2 screen -x root/Master fi However this keeps the calling script active till the screen session exits,even if it's detached. What I want to do is have the calling script finish and exit while the screen session stays active. I've tried daemonising the screen -x lines and adding an & to the end of the screen -x lines neither of which work properly. Ideas?

    Read the article

  • Nginx, logrotate and empty files

    - by tzulberti
    I have a problem with nginx/logrotate. The problems is that nginx is logging access to 2 files (main and data). I have the following contrab setting: 0 * * * * /usr/sbin/logrotate -f /home/orwell/orwell-setup/bin/logrotate-nginx And the file "logrotate-nginx" has the following content: /tmp/data.log { rotate 90 daily missingok notifempty size 1 sharedscripts postrotate [ ! -f /tmp/nginx.pid ] || kill -USR1 `cat /tmp/nginx.pid` MORE THINGS endscript } /tmp/main.log { rotate 90 daily missingok notifempty size 1 sharedscripts postrotate [ ! -f /tmp/nginx.pid ] || kill -USR1 `cat /tmp/nginx.pid` MORE THINGS endscript } The work is done in the two files, but there is a problem that nginx stops logging into those files. Both files are created, but they are empty. Any ideas why nginx stop logging info to both files?

    Read the article

  • Log with iptalbes which user is delivering email to port 25

    - by Maus
    Because we got blacklisted on CBL I set up the following firewall rules with iptables: #!/bin/bash iptables -A OUTPUT -d 127.0.0.1 -p tcp -m tcp --dport 25 -j ACCEPT iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --gid-owner mail -j ACCEPT iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --uid-owner root -j ACCEPT iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --uid-owner Debian-exim -j ACCEPT iptables -A OUTPUT -p tcp -m limit --limit 15/minute -m tcp --dport 25 -j LOG --log-prefix "LOCAL_DROPPED_SPAM" iptables -A OUTPUT -p tcp -m tcp --dport 25 -j REJECT --reject-with icmp-port-unreachable I'm not able to connect to port 25 from localhost with another user than root or a mail group member - So it seems to work. Still some questions remain: How effective do you rate this rule-set to prevent spam coming from bad PHP-Scripts hosted on the server? Is there a way to block port 25 and 587 within the same statement? Is the usage of /usr/sbin/sendmail also limited or blocked by this rule-set? Is there a way to log the username of all other attempts which try to deliver stuff to port 25?

    Read the article

  • grep only returns help text

    - by Pete Mancini
    Well, I am perplexed. I am working with an Ubuntu server and I type in grep 'bash' *.sh BUT fgrep 'bash' *.sh works like a champ. which grep and which fgrep both point to their respective executables in /bin. I am perplexed as to what I am doing wrong. EXAMPLE output: $ grep -F 'grounding' repl.clj Usage: grep [OPTION]... PATTERN [FILE]... Search for PATTERN in each FILE or standard input. PATTERN is, by default, a basic regular expression (BRE). Example: grep -i 'hello world' menu.h main.c $ fgrep 'grounding' repl.clj (p/concepts-for-grounding-term imp1 "PERSON" "summary") See? grep is failing but fgrep is working fine. That is why I am perplexed.

    Read the article

  • uWSGI and python virtual env

    - by user27512
    I'm trying to use uWSGI with a virtual env in order to use the Trac bug tracker on it. I've installed system-wide uwsgi via pip. Next, I've installed trac in a virtualenv $ virtualenv venv $ . venv/bin/activate $ pip install trac I've then written a simple uWSGI configuration script: [uwsgi] master = true processes = 1 socket = localhost:3032 home = /srv/http/trac/venv/ no-site = true gid = www-data uid = www-data env = TRAC_ENV=/srv/http/trac/projects/my_project module = trac.web.main:dispatch_request But when I try to launch it, it fails: $ uwsgi --http :8000 --ini /etc/uwsgi/vassals-available/my_project.ini --gid www-data --uid www-data ... Set PythonHome to /srv/http/trac/venv/ ... *** Operational MODE: single process *** ImportError: No module named trac.web.main unable to load app 0 (mountpoint='') (callable not found or import error) I think uWSGI isn't using the virtual env. When inside the virtual env, I can import trac.web.main without having an ImportError. How can I do that ? Thanks

    Read the article

  • Checking version of Applications installed in ~/Applications with unknown username

    - by ridogi
    I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications /bin/cat /Applications/Firefox.app/Contents/Info.plist | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g' For standard users Firefox auto update breaks if it is in /Applications so I instead have it installed in ~/Applications I'd like to check that copy (if it exists), but I can't specify the path in the command since it is unique to each computer. For example: /Users/jon/Applications/Firefox.app /Users/arya/Applications/Firefox.app Presumably I want to use find and pipe the result to my command. This should work for 10.6 through 10.8

    Read the article

  • Can't pipe echo to netcat?

    - by user1641300
    I have the following command: echo 'HTTP/1.1 200 OK\r\n' | nc -l -p 8000 -c and when I curl localhost:8000 I am not seeing HTTP/1.1 200 .. being printed. I am on mac os x with netcat 0.7.1 Any ideas? #!/bin/bash trap 'my_exit; exit' SIGINT SIGQUIT my_exit() { echo "you hit Ctrl-C/Ctrl-\, now exiting.." # cleanup commands here if any } if test $# -eq 0 ; then echo "Usage: $0 PORT" echo "" exit 1 fi while true do echo "HTTP/1.1 200 OK\r\n" | nc -l -p ${1} -c done and testing with: curl localhost:8000

    Read the article

  • Remove postgres from Mac - installed in /usr/local/, can I just delete files?

    - by Richard
    I want to completely uninstall postgres and start from scratch - the version I have is refusing to work with PostGIS 2.0. I have read other answers on how to do this, but none of them seem to fit the way postgres is set up on this machine. I'm not sure postgres was originally installed on this machine - it wasn't via brew or Postgres.app or the EnterpriseDB installer - but it seems to be living in /usr/local: $ which psql /usr/local/pgsql-9.1/bin/psql The postgres binary itself is in /usr/local/var/postgres/. How can I kill it forever? Can I simply go to /usr/local and do rm -rf pgsql-9.1, and the same in /usr/local/var, and make sure there are no paths in my profile file? Or is there more to it than that? From memory I think I'll need to delete the database files too somehow. Thanks for the help.

    Read the article

  • where does windows vista hide the path environment variable?

    - by Bec
    i think that's what i need? i'm not sure i'm trying to run a command line program (BLAST, from NCBI) but it won't recognise the commands (blastall, formatdb, etc.) so i think i need to add the folder the bin is in to the path environment variable? i think that's what i need to do? i think that's what it's called? I think i've been shown this a few times, but i don't need to do it often, so i keep forgetting.

    Read the article

  • How to tell start-stop-daemon to update $HOME and $USER accordingly to --chuid parameter

    - by iElectric
    I'm trying to run a service that uses $HOME and $USER environment variables. I could set them in service itself, but that would only be a temporary solution. Let's say I have a script test.sh with following content: echo $USER And I run it with start-stop-daemon to see my results: $ start-stop-daemon --start --exec `pwd`/test.sh --user guest --group guest --chuid -guest root Seems like it does not update environment, maybe that should be reported as a bug? I have found a nasty hacky solution, which only works (for unknown reason) on my this simple use case: $ start-stop-daemon --exec /usr/bin/sudo --start -- -u guest -i 'echo $USER' guest I'm sure someone else stumbled upon this, I'm interested in clean solution. $ start-stop-daemon --version start-stop-daemon 1.13.11+gentoo

    Read the article

  • Can't access Terminal anymore, only shows a cursor

    - by user138304
    I run OS X. Following these directions (Installing MySQL on Mac OS X) I added a file to /usr and the contents were PATH=/usr/local/mysql/bin:$PATH Actually I was trying to get the mysql command to work now I cannot access terminal. All I get is a cursor but no command line. I also cannot find the file I created in the Finder. I used command shift G to find the folder /usr and the file is not there. Edit: I Solved the problem by restarting my computer. I am really not sure what the problem was. I got the idea because Could not open a new pseudo-tty. appeared in my terminal after following slhck directions to remove my .profile file. I then searched google and found this; http://blogs.oreilly.com/digitalmedia/2008/03/fixing-terminal-tty-errors.html. Thanks

    Read the article

  • How to add a service to the S runlevel in Debian?

    - by MasterM
    I have the following script (what it does exactly is not important): #!/bin/sh -e ### BEGIN INIT INFO # Provides: watchdog_early # Required-Start: udev # Required-Stop: # Default-Start: S # Default-Stop: # X-Interactive: true # Short-Description: Start watchdog early. ### END INIT INFO # Do stuff here... I insert it into the S runlevel by invoking: insserv watchdog_early The aproriate link is created in /etc/rcS.d: S04watchdog_early -> ../init.d/watchdog_early and /etc/init.d/watchdog_early is executable (has mode 755). Despite all this, it is NOT being run at boot. Why?

    Read the article

  • Can't get ZSH working on CentOS

    - by waveslider
    I've been using zsh for a couple of years now on Ubuntu and really like it a lot. I've installed it on our production server as well, which is running CentOS 5.2 However, I just installed it via yum on a new VM I created to use as a development box, to replicate our production box as closely as possible. Although yum shows that it is definitely installed (/bin/zsh) and that it is set as my shell, it does not appear to be working. Instead of creating the .zshrc and .profile files in my home directory, it created a .tcshrc file. Also, I did not receive the default configuration menu that is always displayed once you begin using ZSH, and none of the features (like advanced tab comple

    Read the article

  • Crontab + .sh + php

    - by Kristaps Karlsons
    Hi. I'm trying to call a shell script every 5 minutes, witch executes php file under root. # crontab -l */5 * * * * /home/regularuser/call.sh permissions: -rw-rw-rw- 1 root root 162 Jun 6 23:40 call.php -rwxr-xr-x 1 root root 66 Jun 7 01:20 call.sh call.sh contents: #!/bin/bash php -q /home/regularuser/call.php echo "request processed" My problem is that my php file doesn't get executed via crontab. However, if I call call.sh - everything works perfectly. I'm new to crontab and shell scripting, so any advice/resources are welcome.

    Read the article

  • Delete files on external hard drive affect SSD?

    - by haar
    I've got a SSD as my primary hard drive. I have an external HDD hard drive which I use to store downloaded files. At the moment I have to delete 80 GB of that external hard drive. I realized that if I delete it normally, it would probably go to the recycle bin of my SSD. I am wondering how I can delete the files on my HDD without affecting the SSD or putting any files on it. Do you know how to do this? Best, haar

    Read the article

  • not able to upload files into mediawiki -- weird one

    - by Michael
    Completely frustrating me. When I try and upload a small jpeg file I get the following error: Warning: wfMkdirParents: failed to mkdir "/usr/local/mediawiki-1.20.5/images/5/5d" mode 0777 in /usr/local/mediawiki-1.20.5/includes/GlobalFunctions.php on line 2546 CentOS 6.4 MediaWiki 1.20.5 PHP 5.5.0RC1 (apache2handler) MySQL 5.5.31 php.ini safe_mode = off; file_uploads = On max_file_uploads = 20 localsettings.php $wgEnableUploads = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; images folder chown apache:apache images/ chmod 755 -R images/ (threw error) chmod 777 -R images/ (threw error) I've restart apache and still cannot upload. I'm stumped. Any ideas?

    Read the article

  • Most secure way to have IPtables auto-loaded using Debian / Linux

    - by networkIT
    I'd like to know the safest way to load iptables using Debian. Of course, I can use a script that uses iptables-restore : #!/bin/sh iptables-restore < /etc/firewall.conf but : 1) where is the safest place to have it loaded ? /etc/network/if-up.d ? I'm concerned about the script being loaded early enough at boot time, and reliably enough when plugging/unplugging interfaces ... 2) is this script method using iptables-restore the most secure way ? 3) additionnally, how much does the answer validity stretch to other Linux distros ( Ubuntu, Fedora, CentOS ) ? Thanks ^^

    Read the article

  • Apache Alias / VirtualHost run as different user

    - by inx
    I tried to create an alias or virtual host to run as different user. Well below is part of apache httpd.conf that doesn't work. Or, is it even possible? <VirtualHost blah:80> user DifferentUser group DifferentGroup ServerAdmin blah DocumentRoot blah ServerName blah ServerAlias blah ScriptAlias /cgi-bin/ blah DirectoryIndex index.html index.htm default.htm index.shtml index.php ErrorLog logs/blah-error_log CustomLog logs/blah-access_log common <Directory "/blah/"> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride all Order Deny,Allow Deny from none Allow from all </Directory> </VirtualHost>

    Read the article

  • java for freebsd

    - by rawman
    I am trying to install java on freebsd 7.X and i have done following thing so far download the tar file from this link and store the file in cd /usr/ports/distfiles/ after that i run cd /usr/ports/java/diablo-jre16 or cd /usr/ports/java/diablo-jdk16 make config install clean and uncheck all the options in config screen now after doing all this now i am getting following message to indicate for amd version even if my server is using intel Core2Quad Q9550 2.83 GHz mail# make install === Vulnerability check disabled, database not found === License check disabled, port has not defined LICENSE === Found saved configuration for diablo-jdk-1.6.0.07.02_12 Because of licensing restrictions, you must fetch the distribution manually. Please access http://www.FreeBSDFoundation.org/cgi-bin/download?download=diablo-caffe-freebsd7-amd64-1.6.0_07-b02.tar.bz2 with a web browser and "Accept" the End User License Agreement for "Caffe Diablo 1.6.0". Please place the downloaded file(s) in /usr/ports/distfiles. * Error code 1 Stop in /usr/ports/java/diablo-jdk16. mail# (as before i was getting error for tzupdater so i downloaded tzupdater-1_3_29-2010f.zip and put it in a cd /usr/ports/distfiles/ folder)

    Read the article

  • VirtualBox error with Ubuntu virtual machine

    - by user2985363
    I am trying to work on a coding project and cannot open my Ubuntu virtual machine with Oracle VM VirtualBox. I took a snapshot yesterday at about 11, and it was working fine. Several times I closed and reopened it. Today when I tried to open it, I kept getting the error below. Failed to open a session for the virtual machine Ubuntu 12.04 32-bit. VM cannot start because the saved state file 'C:\Users\Tyler\VirtualBox VMs\Ubuntu 12.04 32-bit\Snapshots\2014-01-30T19-59-05-976647800Z.sav' is invalid (VERR_FILE_NOT_FOUND). Deleted the saved state prior to starting the VM. I tried deleting the file as it said, but none of the snapshots would open still. The file is still in my recycling bin. What can I do? Also, I took the 1/31 snapshot today before I deleted the previous one.

    Read the article

  • Handling expected supervisord exit codes

    - by Mulkave
    I am using supervisord inside a Docker container to manage my running processes and would like to also use it to trigger certain commands - run them once and expect them to exit with 0. Here's one example: [program:central-seed-posts] command = /usr/bin/php /var/www/app/artisan post autostart = false autorestart = false startsecs = 3 startretries = 0 exitcodes = 0 stderr_logfile=/tmp/central/posts-stderr-supervisor.log stdout_logfile=/tmp/central/posts-stdout-supervisor.log And I'm using nsenter's docker-enter with supervisorctl start central-seed-posts to trigger it but I would also like to handle a successful exit instead of supervisor telling me ERROR (abnormal termination) Does it have to do with supervisor events ?

    Read the article

  • Why does deleting from the command line take significantly less time than from a GUI?

    - by Jordan Plahn
    So this is probably the dumbest question you'll read today, but it's something I just wondered about as I was deleting a dozen or so images from my computer. With a quick rm -rf command on the directory's contents, all the images were gone in a snap. When I drag the same dozen or so images to a trash can/recycle ban, it takes sometimes 10 seconds or more. Now I'm sure some of it comes from the overhead of the GUI and such, and some of it may be the fact that the file still "exists" in some form if it's put into the recycle bin, but is there anything else that accounts for such a huge time disparity? Are "rm" and "delete" just such fundamentally different commands so I'm trying to compare apples and oranges? Enlighten me, please!

    Read the article

  • Timeout ssh sessions after inactivity?

    - by Insyte
    PCI requirement 8.5.15 states: "If a session has been idle for more than 15 minutes, require the user to re-enter the password to re-activate the terminal." The first, and most obvious, way to deal with ssh sessions that are idling at the bash prompt is by enforcing a read-only, global $TMOUT of 900. Unfortunately, that only covers sessions sitting at the bash prompt. The spirit of the PCI spec would also require killing sessions running top/vim/etc. I've considered writing a */1 cron job that parses the output of "/usr/bin/w" and kills the associated shell, but that seems like a blunt instrument. Any ideas for something that would actually do what the spec requires and just lock the terminal? I've looked at away and vlock; they both seem great for voluntarily locking your terminal, but I need a cron/daemon task that will enforce locking.

    Read the article

  • MySQL simple replication problem: 'show master status' produces 'Empty set'?

    - by simon
    I've been setting up MySQL master replication (on Debian 6.0.1) following these instructions faithfully: http://www.neocodesoftware.com/replication/ I've got as far as: mysql > show master status; but this is unfortunately producing the following, rather than any useful output: Empty set (0.00 sec) The error log at /var/log/mysql.err is just an empty file, so that's not giving me any clues. Any ideas? This is what I have put in /etc/mysql/my.cnf on one server (amended appropriately for the other server): server-id = 1 replicate-same-server-id = 0 auto-increment-increment = 2 auto-increment-offset = 1 master-host = 10.0.0.3 master-user = <myusername> master-password = <mypass> master-connect-retry = 60 replicate-do-db = fruit log-bin = /var/log/mysql-replication.log binlog-do-db = fruit And I have set up users and can connect from MySQL on Server A to the database on Server B using the username/password/ipaddress above.

    Read the article

< Previous Page | 179 180 181 182 183 184 185 186 187 188 189 190  | Next Page >