Announcement

Collapse
No announcement yet.

Turning off forums via a shell script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simetrical
    replied
    Thanks! I thought I was subscribed to this thread, but apparently not. Won't this fail with APC, however? Would I have to run a command through PHP to actually update the datastore being used?

    Leave a comment:


  • Wayne Luke
    replied
    Run both these queries to turn your forums off:

    Code:
    UPDATE datastore SET data=REPLACE(data,'s:8:"bbactive";i:1;','s:8:"bbactive";i:0;') WHERE title='options';
    Code:
    UPDATE setting SET value=0 WHERE varname='bbactive';
    Run both these queries to turn your forums back on:

    Code:
    UPDATE datastore SET data=REPLACE(data,'s:8:"bbactive";i:0;','s:8:"bbactive";i:1;') WHERE title='options';
    Code:
    UPDATE setting SET value=1 WHERE varname='bbactive';

    Leave a comment:


  • Floris
    replied
    Code:
    UPDATE datastore SET data=REPLACE(data,'s:8:"bbactive";i:1;','s:8:"bbactive";i:0;') WHERE title='options';
    UPDATE setting SET value=0 WHERE varname='bbactive';

    Leave a comment:


  • Simetrical
    started a topic Turning off forums via a shell script

    Turning off forums via a shell script

    I've adapted the shell script from here to turn off my forums before backup using
    Code:
    mysql -e "UPDATE setting SET value=0 WHERE varname='bbactive'"
    The problem is that I have to somehow refresh the datastore for this to take effect, apparently. Is there some easy way to do this from a shell script running as root?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X