Tag Info

New answers tagged

0

You can write a LUA script that does that. Send the key name as KEYS, and value string and expiration as ARGV: redis.call('set', KEYS[1], ARGV[1],'EX', ARGV[2]) return 1 You can also call set only if expiration > 0. You can return any answer you want, regardless of the operation made. Load you LUA script once with SCRIPT LOAD, save its SHA1 answer, and ...


0

I had this error trying to run Celery, and i had exactly the opposite problem. I changed my user from root to www-data and that solved it.


2

Suggestion: #!/bin/sh echo echo "*** Moving to Live ***" echo cd /path/to/project || exit unset GIT_DIR git pull origin master echo echo "*** Pulling to Live ***" echo /etc/init.d/nginx restart #exec git-update-server-info Took from my server and works well for me. Don't forget to fix the path, the ...


2

according to article at digitalocean instead of GIT_WORK_TREE you need a combo of --work-tree and --git-dir options: git --work-tree=/var/www/html --git-dir=/home/demo/proj checkout -f and for post-receive script it ends up being slightly different construct than what you have: #!/bin/bash while read oldrev newrev ref do if [[ $ref =~ .*/master$ ]]; ...


2

Protecting Python code from IP theft or other snooping is next to impossible. I have researched this extensively for a product we build at my day job. If you need to protect this code, you'll either need to host it off site or port it to a compiled language.


0

Solved edited /var/lib/pgsql/9.3/data/postgresql.conf unix_socket_directories = '/tmp,/var/pgsql_sock' mkdir /var/pgsql_sock/ chown postgres:postgres /var/pgsql_sock edited setting.py in my django app .....HOST='/var/pgsql_sock' Now works fine with httpd.service thanks @MichaelHampton @TimBrigham


0

I'm mostly a fan of using local TCP connections as Michael Hampton pointed out, however you can manually specify another directory and / or symbolically link to another location that'll work around this issue. For example: mkdir /var/pgsql_socket/ ln -s /tmp/.s.PGSQL.5432 /var/pgsql_socket/ And point Apache at /var/pgsql_socket


2

You cannot use /tmp to store sockets for interprocess communication in this scenario, because Apache uses private /tmp directories, a security feature that ensures that a process can only see its own /tmp directory; it cannot see what other processes write into /tmp because those other processes are actually writing into different directories. This means ...



Top 50 recent answers are included