4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
12 results tagged script x
  • Note: Docker stop non standard software (ignoring SIGTERM)

    docker stop command send SIGTERM to pid1 inside the container to let a chance to stop gracefully (https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers/)
    Unfortunatly some software ignore SIGTERM and need to be stopped by their own command (hello opendj)

    To do so, in the Dockerfile, in the CMD, I use a script like this :
    /thecommand/tostart/thesoftware/inbackground
    trap "/thecommand/tostop/thesoftware" SIGTERM
    while true; do sleep 1; done

    so my script is run with PID1, docker stop sends SIGTERM, my script catch (trap) the signal, and run the command to stop gracefully

    February 16, 2017 at 2:16:44 PM GMT+1 - permalink - archive.org - https://links.infomee.fr/?Mxx31A
    catch docker ini script signal stop trap
  • scripts/sync_to_s3.sh at master · gdelpierre/scripts

    via VG

    October 27, 2015 at 5:13:57 PM GMT+1 - permalink - archive.org - https://github.com/gdelpierre/scripts/blob/master/sync_to_s3.sh
    amazon script
  • Afficher l'original d'un fichier qui provient d'un package sous debian en une commande

    à mettre dans son bashrc

    showOriginal() {

    argument = complete path to a file

    output original file content

    packageName=$(dpkg -S $1|cut -d':' -f1)
    tmpdir="/tmp/showOriginal-$packageName-$(date +%s)"
    mkdir $tmpdir
    cd $tmpir
    apt-get download $packageName > /dev/null
    dpkg -x *.deb $tmpdir
    cat ${tmpdir}$1
    cd - >/dev/null
    rm -rf $tmpdir
    }

    September 26, 2014 at 4:59:47 PM GMT+2 - permalink - archive.org - https://links.infomee.fr/?tdQ_tA
    bash bashrc script
  • Writing an init script for a Java application | Gustavo Straube

    Comment créer un script d'init pour une application java.

    EDIT : ce truc n'a pas marché pour moi :
    s=ps -C 'java -jar /path/to/application.jar' -o pid h
    Du coup, j'ai remplacé par :
    s=$(pgrep --full 'une string unique qui identifie la command line pour lancer mon jar')

    !/bin/sh

    #

    init script for a Java application

    #

    Check the application status

    #

    This function checks if the application is running

    check_status() {

    Running ps with some arguments to check if the PID exists

    -C : specifies the command name

    -o : determines how columns must be displayed

    h : hides the data header

    s=ps -C 'java -jar /path/to/application.jar' -o pid h

    If somethig was returned by the ps command, this function returns the PID

    if [ $s ] ; then
    return $s
    fi

    In any another case, return 0

    return 0

    }

    Starts the application

    start() {

    At first checks if the application is already started calling the check_status

    function

    check_status

    $? is a special variable that hold the "exit status of the most recently executed

    foreground pipeline"

    pid=$?

    if [ $pid -ne 0 ] ; then
    echo "The application is already started"
    exit 1
    fi

    If the application isn't running, starts it

    echo -n "Starting application: "

    Redirects default and error output to a log file

    java -jar /path/to/application.jar >> /path/to/logfile 2>&1 &
    echo "OK"
    }

    Stops the application

    stop() {

    Like as the start function, checks the application status

    check_status

    pid=$?

    if [ $pid -eq 0 ] ; then
    echo "Application is already stopped"
    exit 1
    fi

    Kills the application process

    echo -n "Stopping application: "
    kill -9 $pid &
    echo "OK"
    }

    Show the application status

    status() {

    The check_status function, again...

    check_status

    If the PID was returned means the application is running

    if [ $? -ne 0 ] ; then
    echo "Application is started"
    else
    echo "Application is stopped"
    fi

    }

    Main logic, a simple case to call functions

    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
    status
    ;;
    restart|reload)
    stop
    start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|reload|status}"
    exit 1
    esac

    exit 0

    January 2, 2014 at 2:43:49 PM GMT+1 - permalink - archive.org - http://gustavostraube.wordpress.com/2009/11/05/writing-an-init-script-for-a-java-application/
    init initd jar java script
  • MySQL Database Dump Splitter

    Je me garde ça au chaud, ça peut servir

    December 7, 2013 at 3:53:02 PM GMT+1 - permalink - archive.org - https://github.com/sadreck/mysqldbsplit
    mysql script
  • Backup (mysql dump) all your MySQL databases in separate files | Running with Rails - Dev Blog not only for Rails fanatics!

    Script pour backup toutes ses bases dans des fichiers séparés

    October 9, 2013 at 2:54:00 PM GMT+2 - permalink - archive.org - http://dev.mensfeld.pl/2013/04/backup-mysql-dump-all-your-mysql-databases-in-separate-files/
    mysql script
  • Scripting - bash - tutoriels - PiX-Mania Wiki

    Un wiki complet à lire sur quelques outils en bash
    xargs sed cut awk grep find while for

    April 17, 2013 at 11:28:26 AM GMT+2 - permalink - archive.org - http://pix-mania.dyndns.org/mediawiki/index.php/Scripting_-_bash_-_tutoriels#for
    bash script
  • Sauvegarder son site FTP automatiquement avec WinSCP
    November 4, 2012 at 10:02:46 PM GMT+1 - permalink - archive.org - http://syskb.com/sauvegarder-son-site-ftp-automatiquement-avec-winscp/
    backup script winscp
  • Un "ls -rtl" récursif - LinuxFr.org
    February 9, 2012 at 8:33:33 PM GMT+1 - permalink - archive.org - http://linuxfr.org/forums/programmationperl/posts/un-ls-rtl-r%C3%A9cursif
    linux ls perl script
  • Backup FTP et base de données via un script batch
    January 7, 2012 at 7:59:34 PM GMT+1 - permalink - archive.org - http://www.wakdev.com/wiki/divers/73-backup-ftp-et-base-de-donnees-via-un-script-batch.html
    ftp sauvegarde script
  • Backup FTP de serveur OVH
    December 17, 2011 at 11:26:33 PM GMT+1 - permalink - archive.org - http://www.dansteph.com/backupftp.php
    backup ftp script
  • Backup FTP OVH [Archives] - Forum OVH
    December 17, 2011 at 11:25:31 PM GMT+1 - permalink - archive.org - http://forum.ovh.com/archive/index.php/t-9612.html
    backup ftp script
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation