Final fixes
This commit is contained in:
@@ -21,10 +21,6 @@ source="
|
||||
ssh-config"
|
||||
|
||||
package() {
|
||||
# install -dm750 "${pkgdir}/var/lock/one"
|
||||
# install -dm750 "${pkgdir}/var/log/one"
|
||||
# install -dm750 "${pkgdir}/var/run/one"
|
||||
|
||||
install -Dm755 "${srcdir}/ssh-config" "${pkgdir}/usr/share/one/ssh/config"
|
||||
}
|
||||
sha512sums="71c4ebfa1b1c32c59b0fead99730604e0edba617f6d6b9a4e9a4d9671fbe75c60f9f4d53fb5e2f35d7c632c7e308bd047af2f1db769de4134eb078d7b0fc3486 ssh-config"
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
userdel -r oneadmin && echo ">> User 'oneadmin' has been removed."
|
||||
groupdel cloud && echo ">> Group 'cloud' has been removed."
|
||||
ONE_GROUP=cloud
|
||||
ONE_USER=oneadmin
|
||||
|
||||
rm -rf /var/lib/one /var/run/one /var/log/one /var/lock/one
|
||||
userdel -r ${ONE_USER} 2>/dev/null && echo ">> User '${ONE_USER}' has been removed."
|
||||
groupdel ${ONE_GROUP} 2>/dev/null && echo ">> Group '${ONE_GROUP}' has been removed."
|
||||
|
||||
rm -rf /var/lib/one /var/run/one /var/log/one /var/lock/one 2>/dev/null
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -32,7 +32,7 @@ create_oneuser() {
|
||||
create_cloudgroup
|
||||
create_oneuser
|
||||
|
||||
# install ~oneadmin/.ssh/config if not present on a fresh install only
|
||||
# Install ~oneadmin/.ssh/config if not present on a fresh install only
|
||||
if [ ! -e "${ONEHOME}/.ssh/config" ] && [ -z "$2" ]; then
|
||||
if [ ! -d "${ONEHOME}/.ssh" ]; then
|
||||
mkdir -p "${ONEHOME}/.ssh"
|
||||
@@ -44,14 +44,13 @@ if [ ! -e "${ONEHOME}/.ssh/config" ] && [ -z "$2" ]; then
|
||||
chown "$ONE_USER:$ONE_GROUP" "${ONEHOME}/.ssh/config"
|
||||
fi
|
||||
|
||||
# Fix permissions oneadmin:cloud
|
||||
# Set permissions and owner oneadmin:cloud
|
||||
for F in /var/lock/one /var/log/one /var/run/one
|
||||
do
|
||||
if [ ! -d "${F}" ]; then
|
||||
mkdir -p "${F}"
|
||||
chmod 0750 "${F}"
|
||||
chown "${ONE_USER}:${ONE_GROUP}" "${F}"
|
||||
echo "CHOWNED ${F}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user