Skip to content
Snippets Groups Projects
Commit 88241a9a authored by Bob Mottram's avatar Bob Mottram
Browse files

Copy rust binaries so that they can be used by non-root users

parent 860498b7
No related branches found
No related tags found
No related merge requests found
......@@ -278,6 +278,10 @@ function install_plume {
if [ ! -f /root/.cargo/bin/rustc ]; then
echo "Unable to install rust"
fi
if [ ! -f /usr/local/bin/cargo ]; then
cp /root/.cargo/bin/* /usr/local/bin/
fi
if [ ! "$PLUME_DOMAIN_NAME" ]; then
echo $'No domain name was given'
exit 3568356
......@@ -385,7 +389,7 @@ function install_plume {
echo 'User=plume';
echo 'Group=plume';
echo 'WorkingDirectory=/etc/plume';
echo 'ExecStart=/usr/local/bin/plume';
echo 'ExecStart=/usr/local/bin/cargo run';
echo 'Environment=USER=plume';
echo 'Environment=FEATURES=postgres';
echo 'Restart=always';
......
......@@ -63,10 +63,8 @@ function install_rust {
chroot "$rootdir" "$INSTALL_DIR/rustup.sh" -y
fi
if ! grep -q 'RUSTPATH=' ~/.bashrc; then
echo 'export RUSTPATH=/root/.cargo/bin' >> ~/.bashrc
echo "export PATH=\$PATH:\$RUSTPATH" >> ~/.bashrc
fi
# copy binaries so that they can be accessed by non-root users
cp /root/.cargo/bin/* /usr/local/bin/
}
# NOTE: deliberately there is no "exit 0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment