XF 2.1 Changing admin options via the command line

Viqsi

Member
Is there any way to toggle admin options via cmd.php or some other command line approach? In particular, I'm looking for something that'll flip the "Board active" switch when I'm preparing to do a database backup and flip it back on when done, and I'd really like to be able to automate it without resorting to using curl or something equally perverse. I've been rather hesitant to just go rummaging through the database directly as I don't know if that'd leave XF in an inconsistent state or not.

Please let me know. Thanks!
 
I'm also interested in this feature.
But I don't see any commands available in cmd.php
Maybe an add-on can do it?
I've seen the board get closed automatically when an upgrade process is running.
 
I just created a free add-on for this, And I'd like to share it with you guys...
here you go

Feel free to modify the source and send pull requests.

But I'm still not sure if it's still safe to automate mysqldump process without stopping the webserver service (Nginx or Apache) because even the board has deactivated, Users' last visit records could still run update queries? Maybe @Chris D would help
 
Last edited:
Top Bottom