last fix, added chmod call to init.py

This commit is contained in:
Stefan Weijers 2021-07-25 21:51:11 +02:00
parent 5fc38c8305
commit a819195b83
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ from config import bcolors
#Create motd entry
try:
motdscript = open('/etc/update-motd.d/stats', 'w')
os.system('chmod +x /etc/update-motd.d/stats')
except:
print('[' + bcolors.FULL + 'IMPORTANT' + bcolors.RESET + ']')
print('Make sure you run the program as root!')
@ -18,5 +19,6 @@ motdscript.write('#!/bin/bash\n{}/start.sh'.format(cwd))
#Create start script
startscript = open('start.sh', 'w')
startscript.write('#!/bin/bash\npython3 {}/time.py\necho\npython3 {}/diskusage.py\necho\npython3 {}/services.py'.format(cwd, cwd, cwd))
os.system('chmod +x {}/start.sh'.format(cwd))
print('All done!')