mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
automatic participantdir creation due to .gitignore ignoring them by default, to facilitate upgrades
This commit is contained in:
parent
651beb1666
commit
5928fd34ad
2 changed files with 19 additions and 1 deletions
|
@ -9,7 +9,7 @@ import urllib
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.system('clear')
|
#os.system('clear')
|
||||||
proxies = {
|
proxies = {
|
||||||
'http': 'socks5h://127.0.0.1:9050',
|
'http': 'socks5h://127.0.0.1:9050',
|
||||||
'https': 'socks5h://127.0.0.1:9050'
|
'https': 'socks5h://127.0.0.1:9050'
|
||||||
|
@ -17,6 +17,24 @@ def main():
|
||||||
|
|
||||||
rootpath='/srv/darknet-lantern/'
|
rootpath='/srv/darknet-lantern/'
|
||||||
urlpath=pwd.getpwuid(os.getuid()).pw_dir+"/.darknet_participant_url"
|
urlpath=pwd.getpwuid(os.getuid()).pw_dir+"/.darknet_participant_url"
|
||||||
|
participantsdir=rootpath+'www/participants/'
|
||||||
|
officialparticipants=rootpath+'www/.official_participants'
|
||||||
|
|
||||||
|
# check if /srv/darknet-lantern/www/participants directory exists,
|
||||||
|
if not os.path.isdir(participantsdir):
|
||||||
|
print("participants directory doesnt exist, creating it")
|
||||||
|
os.makedirs(participantsdir)
|
||||||
|
# iterate over /srv/darknet-lantern/www/.official_participants, list each line
|
||||||
|
with open(officialparticipants, 'r') as file:
|
||||||
|
# for each line (which is a participant):
|
||||||
|
for line in file:
|
||||||
|
participantdir=participantsdir+line.strip()
|
||||||
|
# check if the directory exists
|
||||||
|
if not os.path.isdir(participantdir):
|
||||||
|
#if not, create it
|
||||||
|
print("Official participan ",line.strip() , "'s directory doesnt exist, creating it")
|
||||||
|
os.makedirs(participantdir)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print_colors("""
|
print_colors("""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue