Explorar o código

command update 2

Jason %!s(int64=2) %!d(string=hai) anos
pai
achega
2cd5d67d77
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      backstage/blogs/routes.py

+ 2 - 2
backstage/blogs/routes.py

@@ -138,10 +138,10 @@ image: ""\n
 
 
 @blogs_app.route('/backstage/update', methods=['GET'])
 @blogs_app.route('/backstage/update', methods=['GET'])
 def update():
 def update():
-    #subprocess.run(["cp -r /var/www/bhouse2 /var/www/bhousebackup"], shell=True)
+    subprocess.run(["cp -r /var/www/bhouse2 /var/www/bhousebackup"], shell=True)
     subprocess.run(["cd /var/www/bhouse2/New-Bhouse-Web; hugo"], shell=True)
     subprocess.run(["cd /var/www/bhouse2/New-Bhouse-Web; hugo"], shell=True)
     time.sleep(5)
     time.sleep(5)
-    subprocess.run(["rsync -azn -e ssh /var/www/bhouse2/New-Bhouse-Web/public root@172.105.241.163:/var/www/New-Bhouse-Web"], shell=True) # remove n before handing to customer
+    subprocess.run(["rsync -azvn -e ssh /var/www/bhouse2/New-Bhouse-Web/public root@172.105.241.163:/var/www/New-Bhouse-Web"], shell=True) # remove n before handing to customer
     return redirect(url_for('blogs.blog_list'))
     return redirect(url_for('blogs.blog_list'))
 
 
 @blogs_app.route('/backstage/blogs', methods=['GET'])
 @blogs_app.route('/backstage/blogs', methods=['GET'])