mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-03-09 03:28:13 +00:00
remove oxicloud user
This commit is contained in:
@@ -44,7 +44,6 @@ function update_script() {
|
||||
export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
||||
$STD cargo build --release
|
||||
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
||||
chown -R oxicloud:oxicloud /mnt/oxicloud /opt/oxicloud /etc/oxicloud
|
||||
msg_ok "Updated OxiCloud"
|
||||
|
||||
msg_info "Starting OxiCloud"
|
||||
|
||||
@@ -27,14 +27,12 @@ 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}"
|
||||
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
|
||||
$STD 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|" \
|
||||
@@ -44,7 +42,6 @@ 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
|
||||
chown -R oxicloud:oxicloud /opt/oxicloud /etc/oxicloud
|
||||
msg_ok "Configured OxiCloud"
|
||||
|
||||
msg_info "Creating OxiCloud Service"
|
||||
@@ -55,8 +52,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=oxicloud
|
||||
Group=oxicloud
|
||||
User=root
|
||||
EnvironmentFile=/etc/oxicloud/.env
|
||||
ExecStart=/usr/bin/oxicloud
|
||||
Restart=always
|
||||
|
||||
Reference in New Issue
Block a user