diff --git a/ct/open-archiver.sh b/ct/open-archiver.sh index af71b58c5..6ad114a28 100644 --- a/ct/open-archiver.sh +++ b/ct/open-archiver.sh @@ -38,11 +38,16 @@ function update_script() { mv /opt/openarchiver.env /opt/openarchiver/.env msg_info "Updating Open Archiver" + cd /opt/openarchiver $STD pnpm install --shamefully-hoist --frozen-lockfile --prod=false - $STD pnpm build + $STD pnpm run build:oss $STD pnpm db:migrate msg_ok "Updated Open Archiver" + if grep -q '^ExecStart=/usr/bin/pnpm docker-start$' /etc/systemd/system/openarchiver.service; then + sed -i 's|^ExecStart=/usr/bin/pnpm docker-start$|ExecStart=/usr/bin/pnpm docker-start:oss|' /etc/systemd/system/openarchiver.service + fi + msg_info "Starting Services" systemctl start openarchiver msg_ok "Started Services" diff --git a/install/open-archiver-install.sh b/install/open-archiver-install.sh index 628ede760..126c46c16 100644 --- a/install/open-archiver-install.sh +++ b/install/open-archiver-install.sh @@ -90,7 +90,7 @@ sed -i "s|^ENCRYPTION_KEY=.*|ENCRYPTION_KEY=$SECRET_KEY|g" /opt/openarchiver/.en sed -i "s|^TIKA_URL=.*|TIKA_URL=|g" /opt/openarchiver/.env echo "ORIGIN=http://$IP_ADDR:3000" >> /opt/openarchiver/.env $STD pnpm install --shamefully-hoist --frozen-lockfile --prod=false -$STD pnpm build +$STD pnpm run build:oss $STD pnpm db:migrate msg_ok "Setup Open Archiver" @@ -105,7 +105,7 @@ Type=simple User=root EnvironmentFile=/opt/openarchiver/.env WorkingDirectory=/opt/openarchiver -ExecStart=/usr/bin/pnpm docker-start +ExecStart=/usr/bin/pnpm docker-start:oss Restart=on-failure [Install]