Announcement

Collapse
No announcement yet.

Turning off forums via a shell script

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

  • 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?
    System Administrator, Total War Center

    Developer, MediaWiki

  • #2
    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';

    Comment


    • #3
      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';
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud customization and demonstration site.
      vBulletin 5 Documentation - Updated every Friday. Report issues here.
      vBulletin 5 API - Full / Mobile
      I am not currently available for vB Messenger Chats.

      Comment


      • #4
        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?
        System Administrator, Total War Center

        Developer, MediaWiki

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X