ThongCoder commited on
Commit
1d835d5
·
verified ·
1 Parent(s): 9d65dfd

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os, subprocess, threading
2
+
3
+ def start_backup_service():
4
+ subprocess.run(['python3', 'backup.py'])
5
+
6
+ subprocess.run(['export', 'PATH=$PATH:/home/vscode/.local/bin'])
7
+
8
+ print('Starting Restorer.')
9
+ subprocess.run('python3 /restore.py')
10
+ print('Finished.')
11
+
12
+ print('Starting Auto-Backup Service.')
13
+ threading.Thread(target=start_backup_service, daemon=True).start()
14
+
15
+ print('Starting Coder server.')
16
+ subprocess.run(['code-server', '--bind-addr', '0.0.0.0:7860', '--auth', 'none', '/home/vscode/workspace'])