Ensure scuttlebot ownership of the directory
This commit is contained in:
parent
12c690abd5
commit
78d67f6019
|
@ -388,6 +388,7 @@ function mesh_install_scuttlebot {
|
||||||
|
|
||||||
# an unprivileged user to install and run as
|
# an unprivileged user to install and run as
|
||||||
chroot "$rootdir" useradd -d /etc/scuttlebot/ scuttlebot
|
chroot "$rootdir" useradd -d /etc/scuttlebot/ scuttlebot
|
||||||
|
chroot "$rootdir" chown -R scuttlebot:scuttlebot /etc/scuttlebot
|
||||||
|
|
||||||
cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
|
cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -398,7 +399,7 @@ fi
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot
|
chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot
|
||||||
chroot "$rootdir" su -c '/usr/bin/install_scuttlebot' - scuttlebot
|
chroot "$rootdir" sudo -u scuttlebot /usr/bin/install_scuttlebot
|
||||||
rm "$rootdir/usr/bin/install_scuttlebot"
|
rm "$rootdir/usr/bin/install_scuttlebot"
|
||||||
|
|
||||||
if [ ! -f "$rootdir/etc/scuttlebot/node_modules/.bin/sbot" ]; then
|
if [ ! -f "$rootdir/etc/scuttlebot/node_modules/.bin/sbot" ]; then
|
||||||
|
@ -452,6 +453,7 @@ function install_scuttlebot {
|
||||||
|
|
||||||
# an unprivileged user to install and run as
|
# an unprivileged user to install and run as
|
||||||
useradd -d /etc/scuttlebot/ scuttlebot
|
useradd -d /etc/scuttlebot/ scuttlebot
|
||||||
|
chown -R scuttlebot:scuttlebot /etc/scuttlebot
|
||||||
|
|
||||||
cat <<EOF > /usr/bin/install_scuttlebot
|
cat <<EOF > /usr/bin/install_scuttlebot
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
Loading…
Reference in New Issue