Commit 92ec4fd6 authored by onny's avatar onny
Browse files

added misc scripts

parent 5d752a97
#!/usr/bin/python
import tarfile
import re
import os
......@@ -145,12 +147,7 @@ os.chdir(PATH)
with open('upstream.html', 'w') as f:
f.write(html)
bar.update(1)
context = { 'packages_outdated' : packages_outdated,
'packages_uptodate' : packages_uptodate,
'packages_notlisted' : packages_notlisted,
'date' : datetime.datetime.now().strftime("%y/%m/%d %H:%M")}
html =TEMPLATE_ENVIRONMENT.get_template('notlisted.html').render(context)
os.chdir(PATH)
with open('notlisted.html', 'w') as f:
f.write(html)
bar.update(2)
[Unit]
Description=Arch-Upstream
[Service]
Type=simple
WorkingDirectory=/home/onny/www/files/arch-upstream
ExecStart=/home/onny/www/files/arch-upstream/main.py
[Unit]
Description=Run arch-upstream every 3 hours
[Timer]
# Time to wait after booting before we run first time
OnBootSec=10min
# Time between running each consecutive time
OnUnitActiveSec=3h
Unit=arch-upstream.service
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment