mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-03-10 02:34:58 +00:00
Try to fix permission issues
This commit is contained in:
@@ -27,12 +27,14 @@ RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
|
||||
msg_info "Building OxiCloud"
|
||||
cd /opt/oxicloud
|
||||
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
||||
$STD cargo build --release
|
||||
mkdir -p {/mnt/oxicloud,/etc/oxicloud}
|
||||
$STD useradd -U -s /usr/sbin/nologin -M -d /opt/oxicloud oxicloud
|
||||
chown -R oxicloud:oxicloud /opt/oxicloud /etc/oxicloud /mnt/oxicloud
|
||||
$STD sudo --preserve-env -u oxicloud cargo build --release
|
||||
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
||||
msg_ok "Built OxiCloud"
|
||||
|
||||
msg_info "Configuring OxiCloud"
|
||||
mkdir -p {/mnt/oxicloud,/etc/oxicloud}
|
||||
sed -e 's|_STORAGE_PATH=.*|_STORAGE_PATH=/mnt/oxicloud|' \
|
||||
-e 's|_SERVER_HOST=.*|_SERVER_HOST=0.0.0.0|' \
|
||||
-e "s|^#OXICLOUD_BASE_URL=.*|OXICLOUD_BASE_URL=${LOCAL_IP}:8086|" \
|
||||
@@ -42,8 +44,7 @@ sed -e 's|_STORAGE_PATH=.*|_STORAGE_PATH=/mnt/oxicloud|' \
|
||||
-e 's|^#OXICLOUD_ENABLE|OXICLOUD_ENABLE|g' \
|
||||
/opt/oxicloud/example.env >/etc/oxicloud/.env
|
||||
chmod 600 /etc/oxicloud/.env
|
||||
$STD useradd -U -s /usr/sbin/nologin -M -d /opt/oxicloud oxicloud
|
||||
chown -R oxicloud:oxicloud /opt/oxicloud /etc/oxicloud /mnt/oxicloud
|
||||
chown -R oxicloud:oxicloud /opt/oxicloud /etc/oxicloud
|
||||
msg_ok "Configured OxiCloud"
|
||||
|
||||
msg_info "Creating OxiCloud Service"
|
||||
|
||||
Reference in New Issue
Block a user