1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Creating a User Script for Swap On?

Discussion in 'Asuswrt-Merlin' started by pjd50, Feb 24, 2020.

  1. pjd50

    pjd50 Occasional Visitor

    Jul 25, 2015
    Can anyone tell me how to create a user script? I tried to follow the wiki here (https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts) but without luck...

    My goal is to have the swap file turn on anytime I reboot the router. I found instructions here:

    But when I try these commands in Putty, nothing works. I got as far turning the swap on --- but I can't figure out the correct set of commands to get the " /jffs/scripts/post-mount " to automatically turn swap on.

    Can anyone help me? thank you!!
  2. Butterfly Bones

    Butterfly Bones Very Senior Member

    Apr 10, 2017
    This is mine.
    swapon /tmp/mnt/<myUSB>/myswap.swp # Swap file created by amtm
    It is done when I created the swap file using the AsusWrt Merlin Terminal Menu.

    It allows installing other useful scripts as well/