-db.init(true)
- .then(() => {
- return getServerAccount()
- })
- .then(serverAccount => {
- return db.AccountFollow.listAcceptedFollowingUrlsForApi([ serverAccount.id ], undefined)
- })
- .then(res => {
- return res.total > 0
+import { WEBSERVER } from '../server/initializers/constants'
+import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
+import { VideoModel } from '../server/models/video/video'
+import { ActorModel } from '../server/models/activitypub/actor'
+import {
+ getAccountActivityPubUrl,
+ getVideoActivityPubUrl,
+ getVideoAnnounceActivityPubUrl,
+ getVideoChannelActivityPubUrl,
+ getVideoCommentActivityPubUrl
+} from '../server/lib/activitypub/url'
+import { VideoShareModel } from '../server/models/video/video-share'
+import { VideoCommentModel } from '../server/models/video/video-comment'
+import { AccountModel } from '../server/models/account/account'
+import { VideoChannelModel } from '../server/models/video/video-channel'
+import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist'
+import { initDatabaseModels } from '../server/initializers/database'
+import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
+import { getServerActor } from '@server/models/application/application'
+
+run()
+ .then(() => process.exit(0))
+ .catch(err => {
+ console.error(err)
+ process.exit(-1)