add delay after first start

This commit is contained in:
Elton Renda 2020-11-04 19:08:23 +02:00
parent d7e0bab284
commit f077670952
2 changed files with 1 additions and 4 deletions

View File

@ -17,9 +17,6 @@ function error {
fi fi
if [ ! -z ${_ctid-} ]; then if [ ! -z ${_ctid-} ]; then
if [ ! -z ${_mount+x} ]; then
pct unmount $_ctid &>/dev/null
fi
if $(pct status $_ctid &>/dev/null); then if $(pct status $_ctid &>/dev/null); then
if [ "$(pct status $_ctid 2>/dev/null | awk '{print $2}')" == "running" ]; then if [ "$(pct status $_ctid 2>/dev/null | awk '{print $2}')" == "running" ]; then
pct stop $_ctid &>/dev/null pct stop $_ctid &>/dev/null
@ -175,7 +172,6 @@ _pct_options=(
-rootfs $_rootfs,size=$_disk_size -rootfs $_rootfs,size=$_disk_size
-storage $_storage -storage $_storage
-swap $_swap -swap $_swap
-unprivileged 1
-tags npm -tags npm
) )
pct create $_ctid "local:vztmpl/$_template" ${_pct_options[@]} &>/dev/null \ pct create $_ctid "local:vztmpl/$_template" ${_pct_options[@]} &>/dev/null \

View File

@ -193,6 +193,7 @@ EOF
chmod a+x /etc/init.d/npm chmod a+x /etc/init.d/npm
rc-update add npm boot &>/dev/null rc-update add npm boot &>/dev/null
rc-service npm start &>/dev/null rc-service npm start &>/dev/null
sleep 5
# Cleanup # Cleanup
info "Cleaning up..." info "Cleaning up..."