[SOLVED] How do I start scripts at boot up?

I've been looking around for awhile and can't find a way to auto-start scripts I've written in the console (the only ways I've found are for older systems using /etc/rc.local, but my system doesn't have this file.  The only things I've found for systemd are about starting daemons.  I'm not running a desktop environment on this system nor do I plan to (I'm using this machine as a server), so I can't put the scripts in a directory that auto-starts them like I can in KDE (and even then, I think that's only auto-starting them after login; I need these scripts to run without need of logging in).  And since my scripts aren't services I can't use "systemctl enable" to make them start at bootup.
Does anyone know how to start scripts when the system boots?
Last edited by Zukaro (2013-01-10 23:02:22)

https://wiki.archlinux.org/index.php/Sy … process.3F

Similar Messages

  • InDesign CS4 Scripting Help how i can start scripting

    Hi all,
    I'm new to Indesign Scripting, and I'm hoping someone can help me with the following Apple/Java_Script which script language (Apple/Java) good for me.
    (1) Adobe InDesign CS4 Apple/JavaScript tutorial (.PDF/Text/ExampleScript)
    (2) How i can start scripting ???
    I'm working Adobe InDesign/QuarkXpress with ETMV2 with (Pearson DTD/IDML) as a Operator last 4 Year. I want learn Scripting.
    Any one Help/Suggest i really appreciated!
    Thank's
    snegig
    email => [email protected]

    Thank you so much!
    Kudos to you.

  • How do I start slapd at boot time in leopard?

    Greeting,
      Forgive me if this is the wrong forum/community.
      I want to start slapd at boot time on my new leopard upgrade.  On tiger, it was as simple as having an LDAPSERVER=-YES- line in /etc/hostconfig.  That does not seem to work for leopard.  I can run slapd from the command line.  I needed to make changes to the slapd.conf tiger version and reload my database, but all is working fine.  I just have not been able to get the deamon to start at boot up.  It must be simple.  Any ideas?
      Thanks,
    --Linn

    Texas Mac Man,
      Thanks.  Slapd is the OpenLDAP daemon (server) delivered with MacOS, even Client.  No, starting at the user level is not what I need.  I can already do that in a terminal window with /usr/libexec/slapd, after I get su'ed to root.
      Think Unix, not iApps.  When the system boots up, there should be scripts available to start specific daemons.  I am looking for hints there.
    BDAqua,
      Thanks.  I had seen that first discussion before.  It deals with slapd failing when it tries to start on MacOS Server... where all these daemons indeed start at boot time.  I am just trying to figure out how to do in leopard what I successfully did in tiger, namely start /usr/libexec/slapd at boot time.
      And note, this is not an issue with slapd failing due to slapd.conf or database problems.  All works fine from the user lever start.
      Thanks,
    --Linn

  • How do I start service at boot?

    Hello,
      I am relatively new to arch, so I have played with it since .3 on and off but never as a server.  Right now I can start mysql, httpd and exim just fine, but they don't seem to be starting up at boot time.  How do I fix this?
    Thanks,
    mrjohnston

    Hi mrjohnston,
    You have to add an entry for each daemon in the DAEMONS array in the file /etc/rc.conf.  If you add "exim" (for example) to the DAEMONS line, the file /etc/rc.d/exim will be executed, and that should get it started at bootup.
    Cheers.

  • How to automatically start postfix on boot?

    I often need postfix to send e-mail. To use postfix I need to start postfix everytime manually via the Terminal commandline.
    I would like to have postfix to be started automatically with booting.
    Is this possible in Mac OS X Snow Leopard? How can it be done?

    There is already an org.postfix.master.plist file in /System/Library/LaunchDaemons
    I had an old copy of Postfix Enabler from http://cutedgesystems.com/ but didn't appreciate having to buy a new program when Leopard came out, so I rolled my own. Here is my edited org.postfix.master.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.postfix.master</string>
    <key>OnDemand</key>
    <false/>
    <key>Program</key>
    <string>/usr/libexec/postfix/master</string>
    <key>ProgramArguments</key>
    <array>
    <string>master</string>
    </array>
    <key>QueueDirectories</key>
    <array>
    <string>/var/spool/postfix/maildrop</string>
    </array>
    </dict>
    </plist>
    This will enable you to send mail. You can setup your Mac to receive mail too, but that is a bit more involved.

  • [SOLVED] How can I start a daemon at boot as a user?

    Well, the topic title says it all! I want to start the hellanzb daemon as my main user 'hb' on boot. If I just add it to the daemons array in rc.conf, it will be run as root, and all my downloaded files will be owned by root:root. How can I make it so it is run by me, not root?
    Last edited by HyperBaton (2008-01-25 18:44:11)

    HyperBaton wrote:Okay I'll try it with the dash added, didn't notice that in your syntax, sorry. How would I add the echo statement exactly? And can I view it in a log or something after booting the computer?
    the echo statement can be as simple as
    echo "this is a test"
    if you want to log something, you can for example add something like
    | tee -a /var/log/mycustom.log
    this appends the output of the command before | to /var/log/mycustom.log.
    So if you want to log for example the echo statement above, put
    echo "this is a test" | tee -a /var/log/mycustom.log
    but of course you can catch the output of every command in this way

  • [SOLVED] how to prevent Xorg from clearing boot messages in scrollback

    I have an updated Arch install with MATE and LightDM. LightDM autologin is enabled, so I normally boot directly to my desktop. I like seeing the messages that flash by during boot, so I deleted the word "quiet" from the linux line in my grub.cfg. Because I want all the messages to still be there after flashing by (in case I want to scroll through them later), I followed the advice here https://wiki.archlinux.org/index.php/Di … t_messages and I also increased the scrollback buffer and enabled early KMS start.
    Despite all the above, I can only scroll back to the beginning of the boot messages if I boot into non-graphical mode (e.g., by adding "systemd.unit=multi-user.target" to GRUB command line). If I allow a normal boot to my destkop and THEN go to non-graphical mode with "sudo systemctl isolate multi-user.target" to look at the boot messages, I notice that I cannot scroll back very far at all--most of the messages that flashed by during boot are gone. Therefore, it seems to me that either lightDM or Xorg is resetting the scrollback buffer and erasing all but the last few boot messages.
    So, how do I tell LightDM or Xorg (whichever one is the culprit) *not* to clear the scrollback buffer, so that when I get out of graphical mode and into non-graphical mode the boot messages are all still there?
    Last edited by bdantas (2014-08-01 14:19:06)

    Since the answer to my original question seems to be "it is not possible," I will make this my last post to prevent the thread from going off-topic.
    I came up with a simple workaround that (almost) recreates the old /var/boot/log:
    1) put "quiet" on grub2's kernel command line so that only* [FAIL] messages show up, so that I don't have to deal with the scrollback buffer
    2) create a startup script with the following contents (script or at least the setterm command must run as root because the setterm command needs to be able to read from /dev/vcs1):
    #!/bin/bash
    # this script will dump the text of tty1 to /var/log/boot, with same formatting as on the screen
    export TERM=xterm
    setterm -dump 1 -file /var/log/boot
    exit 0
    * Unfortunately, even in quiet mode grub2 starts printing all the boot status messages to screen once it encounters a [FAIL]. Therefore, if the [FAIL] occurs early enough in the boot process, the beginning of the messages will scroll off the screen and the workaround won't work. I spun off my two questions related to this nuisance into their own threads:
    a) How to make grub2 actually only print [FAIL] messages during boot? https://bbs.archlinux.org/viewtopic.php?id=184702
    b) How to print the contents of console's scrollback buffer to a file? https://bbs.archlinux.org/viewtopic.php … 9#p1439359
    I hope I can figure out how to do one of the above, because then the workaround would be perfect.
    Thanks for the help, guys!
    Last edited by bdantas (2014-08-15 02:16:38)

  • How to run a script at boot

    Hello,
    I'm trying to make a simple script to execute at the boot time, which call a program ( C ), but I cant do it. I don't know if there is some special "template" to make that script (like Freebsd has). If you could give some help, I'm new at Solaris (by the way, using Sol 10, and Sol 11 Express).
    thanks,
    Miguel Garcia

    That should be all, any script named S-something and which is placed in /etc/rc2.d or /etc/rc3.d will be executed at boot by the /sbin/rc2 and /sbin/rc3 scripts.
    It will be called with the argument "start".
    If its not working, test the script standalone (i.e. /etc/rc3.d/Sdiverse start) and see what it returns.
    Also, the $PATH and $LD_LIBRARY_PATH might contain unexpected (i.e. minimum) values. Typically $PATH is set to /usr/bin and /usr/sbin and $LD_LIBRARY_PATH will only contain /lib and /usr/lib .
    The working directory is probably / .
    For rc3.d scripts, also check the logfile:
    /var/svc/log/milestone-multi-user-server:default.log
    .7/M.

  • [SOLVED] Imapd does not start (only during boot process)

    I'm running a courier-imap server.
    A few days ago I noticed I did not receive any mails anymore. Then I found my imapd daemon was not running anymore.
    I then stopped the daemon process together with the xinetd daemon (which lets me connect to my imap server via my local network).
    I restart from a terminal both daemons (imapd an xinetd) and ... everything is up and running ! Note that I have to stop xinetd too because only stopping imapd and restarting doesn't help.
    I reboot my PC ... again no imapd anymore. During the boot process I do not get any error message though ...
    I'm completely puzzled
    The problem started when I upgraded to the linux 3.0.1 kernel ...
    Last edited by Strider (2011-08-14 07:59:41)

    I managed to get the problem solved by removing and re-installing the courier-imap package. Don't know why that solved it though ...
    Last edited by Strider (2011-08-14 07:59:05)

  • [Solved] Network does not starts on every boot

    Yet another problem on fresh arch...
    Network service does not starts every time I booting my headless. For every 10 attempts service starts 5 or 6 times only.
    Ping says: Networking unreachable.
    systemctl status network:
    network.service - Static IP Connectivity
    Loaded: loaded (/etc/systemd/system/network.service; enabled)
    Active: inactive (dead)
    'systemctl start network' just hangs. In order to get it start I have to reboot the box hoping next boot service will start.
    I am not using dhcp (if it makes a sence). Service was configured as described in wiki for static IP assigning.
    The config itself:
    [Unit]
    Description=Static IP Connectivity
    Wants=network.target
    Before=network.target
    BindsTo=sys-subsystem-net-devices-enp4s1.device
    After=sys-subsystem-net-devices-enp4s1.device
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/sbin/ip link set dev enp4s1 up
    ExecStart=/sbin/ip addr add 192.168.1.5/24 dev enp4s1
    ExecStart=/sbin/ip route add default via 192.168.1.1
    ExecStop=/sbin/ip addr flush dev enp4s1
    ExecStop=/sbin/ip link set dev enp4s1 down
    [Install]
    WantedBy=multi-user.target
    What's wrong?
    Thanks in advance for any help.
    Last edited by chord (2013-06-03 17:04:55)

    Thaks for your reply.
    I got this interface name from ip addr,  how it should be named if 'enp4s1' is wrong?
    journalctl is here: http://bpaste.net/show/104083/
    I found only one string realted to this device name:
    Jun 03 15:18:23 localhost systemd[1]: Expecting device sys-subsystem-net-devices-enp4s1.device...
    Is there some other logs where it can be checked?

  • How to auto start XAMPP at boot?

    Placing:
    /opt/lampp/lampp start
    in the session will not work because it needs sudo priviliges. But I don't how to config it to auto start at boot on Arch Linux. Thanks

    Probably /etc/rc.local would be your best bet.

  • [SOLVED] How to get BASH scripts to recognize mounted partition paths?

    I don't understand how to get the bash script in the root partition to find the boot partition--both mounted at /mnt.
    I'm following the instructions on configuring "dm-crypt with LUKS" tutorial. The mkinitcpio command to generate the "initial ram disk environment" is producing an error while the system is booted from the install disk and the volumes it looks for are mounted at /mnt.
    #mkinitcpio -p linux
    ==> Building image from preset: /etc/mkinitcpio.d/linux/preset: 'default'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
    ==> Building image from preset: /etc/mkinitcpio.d/linux/preset: 'fallback'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux`
    The script located in /mnt/root/etc can't find the "temporary kernel" located at /mnt/boot.
    Last edited by xtian (2013-09-17 22:01:35)

    And read them carefully, there should be no /mnt/root/etc/.
    There should be a /mnt/etc/ and a /mnt/boot and /mnt/root/ which is the root user's home directory, not the root filesystem (and of course /mnt/usr ...) - or if you decide to nest the whole thing deeper you could have /mnt/somename/etc and /mnt/somename/boot ...

  • [solved] How to run a script on logout?

    I've just migrated from ubuntu and so far I'm really happy with Arch. GNU/Linux really is easier to 'get' with Arch. I've been able to overcome all problems so far with reading previous posts or searching for it by other means, yet this obviously elementary broblem still defies solution.
    - How do I run a script on logout?
    What I want to do on logout is to run 'fusermount -u ~/mounted-dir/', where 'mounted-dir' holds media from my account on another host. I have it set up so that /etc/profile runs ~/.login which in turn runs 'sshfs [email protected]:~/media/ ~/mounted-dir/ -o sshfs_sync -o reconnect'.
    - Is this a reasonable way of Getting Things Done?
    I suspect (as I always do) that there might be a way these things are supposed to be done, this not being it.
    Last edited by pooflinger (2007-10-05 10:05:29)

    pooflinger wrote:
    _adam_ wrote:
    the problem with .bash_logout is it will run whenever you exit a bash instance.
    are you using a desktop environment? do you just want this to happen prior to shutdown? or when you actually log out?
    I pretty sure that .bash_logout only runs if $SHELL is /bin/bash when you log out. I want this to happen when I actually log out.
    yeah, sorry, i forgot its only executed when a login shell is used.

  • How can I start scripting in CS5 for Windows?

    I have just installed CS5. I tried running a script I had adapted from CS4, and it would not run. Then I discovered there were major changes for CS5, and tried running the sample script FindChangeByList on a short piece of text, but it appeared not to start: the cursor remained flashing as it normally does when in text. Should I try reinstalling or is there a less drastic option?

    Hi Michael,
    I think, then, that the problem is one of permissions. What I've done on Windows 7 installations is to go to the InDesign application folder (in program files), select the InDesign.exe file, use the Context menu (right-click) to display the Properties panel, and then turn on the Run This Program as an Administrator option in the Privelege Level section of the Compatibility tab. Click the Change Settings for All Users button to apply the change (assuming that your current user profile is an Administrator).
    Let me know if that helps!
    Thanks,
    Ole

  • [SOLVED] How to disable these messages at boot?

    So I managed to install Arch, and set up the network. I have a Broadcom 4313 wireless chip, all I had to do is blacklist the bcma module, because it conflicted with the brcmsmac module, both are loaded by default (no need to add anything to MODULES=(), only the blacklist bcma entry to modprobe.conf)
    So now I have a wlan0 interface that works perfectly fine, only I get these status messages during boot, that are totally unnecessary, see screenshot. These just pop up from nowhere, and annoy the heck out of me, disrupting the login and whatnot.
    So can these be turned off somehow? I suspect they come from the brcmsmac module itself.
    http://dl.dropbox.com/u/20678367/arch-n … ssages.png
    Mod edit:
    The image is too large: https://wiki.archlinux.org/index.php/Fo … s_and_Code
    Last edited by bernarcher (2011-10-18 19:16:57)

    junkie wrote:
    Gusar wrote:Add "dmesg -n 3" to /etc/rc.local
    That seems to solve my problem, thank you!
    Just out of curiosity, what numbers, or levels are available for the -n switch? The man doesn't state that.
    http://mailman.archlinux.org/pipermail/ … 21114.html
    https://bbs.archlinux.de/viewtopic.php?pid=267954 (it's from the German Arch forum, but the loglevel= stuff is in English)
    Full list: http://www.kernel.org/doc/Documentation … meters.txt
    Last edited by karol (2011-10-18 14:02:47)

Maybe you are looking for

  • Error while running reports

    hi , i am getting the following error , whenever i run any custom report I am using EBS 12.1.2 with DB 11.2.0.1 and OS RHEL 5 Log file contents: Beginning post-processing of request 474402 on node INDSTQEBS02 at 19-NOV-2010 10:34:07. APP-FND-01564: O

  • How do i switch itunes accounts on my iphone?

    Is it possible to change itunes accounts from my iphone 4S??? The account i have now is known by my computer, but my phone acts like it has no idea that i got rid of the old one!!!! Now i can't upgrade or get new apps because my iphone is still using

  • None of the fact sources for [column] are compatible with the detail filter

    Hi Experts, I am using obiee 11.1.1.7. Getting below error when i add a filter of non conformed dimension column. Below is the error Error Details Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P  State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSErr

  • AC adapter gets very hot

    I have a new Thinkpad Edge e530. The adapter gets very hot when the battery is charging.  Not so hot that I can't hold it, but still, very hot. Relevant specs: * Adapter:  65 W * Battery:  "the bigger one" (6 cell LI Bat-75+,62WH) * Graphics:  integr

  • My games data on game centre is there but i don't have the data on the apps, why is this?

    I had my ipod 4g replaced as it had a few bugs on it a while ago. I signed into game centre on my new ipod and all the data of the apps I had before were there. But I cant understand why the data on game centre isn't transfering the the apps on the I