Standardiser les scripts créateurs de LXC (template, autologin, update) #16
@@ -28,9 +28,10 @@ GREEN='\033[0;32m'
|
|||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
NC='\033[0m'
|
NC='\033[0m'
|
||||||
|
|
||||||
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
|
# Logs go to stderr so callers can safely use $(fn) without capturing log noise.
|
||||||
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
|
log_info() { echo -e "${GREEN}[INFO]${NC} $1" >&2; }
|
||||||
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1" >&2; }
|
||||||
|
log_error() { echo -e "${RED}[ERROR]${NC} $1" >&2; }
|
||||||
|
|
||||||
require_root() {
|
require_root() {
|
||||||
if [[ "$(id -u)" -ne 0 ]]; then
|
if [[ "$(id -u)" -ne 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user