README.md : Ajout exemple /usr/local/bin/exec73

This commit is contained in:
Ludovic Poujol 2019-04-12 12:05:07 +02:00
parent cd6abd008d
commit 7b5868db38
1 changed files with 14 additions and 0 deletions

View File

@ -180,6 +180,20 @@ hostname=example.com
FromLineOverride=YES
~~~
#### PHP-CLI
~~~
$ cat /usr/local/bin/exec73
#!/bin/bash
php_cmd=$(printf "/usr/bin/php %q" "$@" )
lxc-attach -n php73 -- su - "$SUDO_USER" -c "$php_cmd"
~~~
Il faut ensuite s'assurer que ce script peut être exécuté via sudo.
## Méthodes de collaboration