mirror of https://github.com/Box-boi/vubuntu.git
Update v1.4.2
This commit is contained in:
parent
6cdadcb008
commit
699db11752
|
|
@ -50,6 +50,8 @@
|
||||||
| DISPLAY | Display Server Port |
|
| DISPLAY | Display Server Port |
|
||||||
| PORT | NoVNC HTTP Port |
|
| PORT | NoVNC HTTP Port |
|
||||||
| NGROK_AUTH_TOKEN | Ngrok Token |
|
| NGROK_AUTH_TOKEN | Ngrok Token |
|
||||||
|
| NO_SLEEP | Prevent Heroku app from sleeping, disabled by default |
|
||||||
|
| APP_NAME | Name of Heroku app |
|
||||||
|
|
||||||
## **Installation :**
|
## **Installation :**
|
||||||
* Heroku Users :
|
* Heroku Users :
|
||||||
|
|
|
||||||
10
app.json
10
app.json
|
|
@ -19,6 +19,16 @@
|
||||||
"description": "VNC Server Resolution in WxH, 720p is preferrable.",
|
"description": "VNC Server Resolution in WxH, 720p is preferrable.",
|
||||||
"value" : "1280x720",
|
"value" : "1280x720",
|
||||||
"required" : true
|
"required" : true
|
||||||
|
},
|
||||||
|
"NO_SLEEP" : {
|
||||||
|
"description": "Prevent app from sleeping, 1=on, 0=off",
|
||||||
|
"value" : "0",
|
||||||
|
"required" : true
|
||||||
|
},
|
||||||
|
"APP_NAME" : {
|
||||||
|
"description": "Name of the app, same as mentioned above.",
|
||||||
|
"value" : "",
|
||||||
|
"required" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
[program:self-ping]
|
||||||
|
command=python3 /app/.vubuntu/assets/scripts/self-ping.py
|
||||||
|
stderr_logfile=/var/log/selfping.err.log
|
||||||
|
stdout_logfile=/var/log/selfping.out.log
|
||||||
|
priority=995
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
from time import sleep
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if os.getenv("NO_SLEEP") == "1":
|
||||||
|
if "APP_NAME" not in os.environ:
|
||||||
|
print("APP_NAME unset, terminating...")
|
||||||
|
exit()
|
||||||
|
app_name = os.getenv("APP_NAME")
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
os.system(f"curl https://{app_name}.herokuapp.com")
|
||||||
|
except:
|
||||||
|
print("Ping failed, retrying...")
|
||||||
|
try:
|
||||||
|
os.system(f"curl -s https://{app_name}.herokuapp.com")
|
||||||
|
except:
|
||||||
|
print("Cannot ping app, terminating...")
|
||||||
|
sleep(25*60)
|
||||||
Loading…
Reference in New Issue