Fixed post-install script and added post-install

dev
santic-zombie 5 months ago
parent cf1221e089
commit 08154d989c
  1. 3
      opennebula-common/APKBUILD
  2. 2
      opennebula-common/opennebula-common.post-install
  3. 10
      opennebula-common/opennebula.post-deinstall

@ -14,7 +14,8 @@ depends="
openssh-client"
install="
${pkgname}.post-install"
${pkgname}.post-install
${pkgname}.post-deinstall"
source="
ssh-config"

@ -17,7 +17,7 @@ create_cloudgroup() {
create_oneuser() {
if ! getent passwd $ONE_USER > /dev/null 2>&1; then
adduser --system --gecos $ONE_COMMENT --uid $ONE_UID --ingroup $ONE_GROUP --home $ONEHOME --shell /bin/ash $ONE_USER
adduser --system --gecos "$ONE_COMMENT" --uid $ONE_UID --ingroup $ONE_GROUP --home $ONEHOME --shell /bin/ash $ONE_USER
else
ONEHOME=`getent passwd $ONE_USER | cut -f6 -d:`
# Renable user (give him a shell)

@ -0,0 +1,10 @@
#!/bin/sh
set -e
rm -rf /var/lib/one /var/run/one /var/log/one /var/lock/one
userdel -r oneadmin && echo ">> User 'oneadmin' has been removed."
groupdel cloud && echo ">> Group 'cloud' has been removed."
exit 0
Loading…
Cancel
Save