mirror of https://github.com/hashicorp/packer
Remove Linux package service configs and pre/post install scripts (#11831)
Packer does not require the installation of a Packer user or a service for Packer. This change removes the preinst and postrm user scripts, and the config_dir directive for Packer rpm installations. Closes #11828pull/11833/head
parent
08157fbdce
commit
805f8a4a86
@ -1,23 +0,0 @@
|
||||
[Unit]
|
||||
Description="HashiCorp Packer - A tool for creating identical machine images for multiple platforms from a single source configuration"
|
||||
Documentation=https://www.packer.io/docs
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=3
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/packer.d/packer.env
|
||||
User=packer
|
||||
Group=packer
|
||||
ProtectSystem=full
|
||||
ProtectHome=read-only
|
||||
ExecStart=/usr/bin/packer server -config=/etc/packer.d
|
||||
ExecReload=/bin/kill --signal HUP $MAINPID
|
||||
KillMode=process
|
||||
KillSignal=SIGINT
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStopSec=30
|
||||
LimitMEMLOCK=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "purge" ]
|
||||
then
|
||||
userdel packer
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
USER="packer"
|
||||
|
||||
if ! id -u $USER > /dev/null 2>&1; then
|
||||
useradd \
|
||||
--system \
|
||||
--user-group \
|
||||
--shell /bin/false \
|
||||
$USER
|
||||
fi
|
||||
Loading…
Reference in new issue