Use mastodon_full_path variable

This commit is contained in:
spla 2020-03-05 12:04:08 +01:00
pare cca8dac21b
commit c7b6d74a32
S'han modificat 1 arxius amb 3 adicions i 4 eliminacions

Veure arxiu

@ -28,7 +28,6 @@ def delete_inactives(mailing_db, mailing_db_user, mailing_db_table, query, id_ar
username_array.append(row[1])
i = 0
if len(id_array) == 0:
sys.exit("None inactive users found!")
@ -37,7 +36,7 @@ def delete_inactives(mailing_db, mailing_db_user, mailing_db_table, query, id_ar
print("\n")
print("Deleting user " + str(i) + " of " + str(len(id_array)) + " users")
print("Deleting user with id " + str(id_array[i]) + ", username: " + username_array[i])
os.system("cd " + mastodon_full_path + " && " + "RAILS_ENV=production " + rvm_ruby + " /var/www/vhosts/mastodont.cat/httpdocs/live/bin/tootctl accounts delete " + username_array[i])
os.system("RAILS_ENV=production " + rvm_ruby + " " + mastodon_full_path + "bin/tootctl accounts delete " + username_array[i])
delete_user(id_array[i], username_array[i])
i += 1