Merge pull request #18 from linuxserver/jammy-fix

fix init
This commit is contained in:
aptalca 2022-09-19 21:56:56 -04:00 committed by GitHub
commit 308f28503f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 12 deletions

2
Jenkinsfile vendored
View File

@ -673,7 +673,7 @@ pipeline {
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/ci:latest \
python /ci/ci.py'''
python3 test_build.py'''
}
}
}

View File

@ -1,23 +1,25 @@
#!/usr/bin/with-contenv bash
if [ ! -e /lock.file ]; then
# give abc a sudo shell
chsh abc -s /bin/bash
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
-i /etc/sudoers
sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
# give abc a sudo shell
chsh abc -s /bin/bash
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
-i /etc/sudoers
sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
fi
# create lock file after first run
touch /lock.file
# default file copies first run
[[ ! -d /config/.config ]] && \
mkdir -p /config/.config && \
cp /defaults/bashrc /config/.bashrc && \
cp /defaults/startwm.sh /config/startwm.sh
if [ ! -d /config/.config ]; then
mkdir -p /config/.config
cp /defaults/bashrc /config/.bashrc
cp /defaults/startwm.sh /config/startwm.sh
fi
# permissions
PERM=$(stat -c '%U' /config/.config)
[[ "${PERM}" != "abc" ]] && \
chown -R abc:abc /config
if [ "${PERM}" != "abc" ]; then
chown -R abc:abc /config
fi