Doh! How do I make a simple systemd service...? [SOLVED]

I've procrastinated long enough.
I have a few symbolic links from various locations that all lead to directories in /tmp or /dev/shm.  These directories were simply created by mkdir in rc.local, and I've forgotten about it sometime ago.
I want systemd to do something like:
mkdir -p /tmp/foo/bar
chmod -R o+rw /tmp/foo/bar
everytime I start up my computer.   I used to have it all in rc.local and it's far simpler than what most people's startup scripts look like.
I tried making this service file, but I'm doing something wrong (due to my lack of understanding, please forgive me).  It shows up as a static service.
[Unit]
Description=rc.local ported to systemd
[Service]
Type=oneshot
ExecStart=/usr/local/bin/rc.local
The rc.local file referenced was simply copied before initscripts were removed.  It contains the series of mkdir and chmod commands (and nothing more).
-ak
Last edited by akspecs (2013-02-18 03:27:43)

cfr wrote:I *think* the way to do this is with temp files but I've never actually had to use these myself. Bound to be in the wiki, though.
the manpage for this is tmpfiles.d (5).

Similar Messages

  • How do i make a simple title in fcpx?

    okay stupid question, how can I make a simple title without any preadjusted parameters/animation/etc..?

    Use the Custom title.

  • How can i make a simple app?

    Hi,  i just became an apple develiper,  Im wondering how to make a simple app like a "flashlight" like app,  Can anybody help me out?  would i have to start from scratch or could i use someone else's start??

    Use your logon to the iOS Dev Center and see this links:
    iOS Human Interface Guidelines
    iOS Starting Point
    Start Developing iOS Apps Today
    App Development Overview
    App Store Review Guidelines for iOS Apps
    Your First iOS App

  • How do I make a simple animation?

    I am building an avation website and want clouds to move across the banner to give the feel that the site/airplane logo is moving in the sky. I already have the clouds that i made in Illustrator but now I need to make a simple GIF that has the cloud move from one side of the screen to the other and repeat. I dont even know how to do animation frames or any of that so I need lots of detail. Thanks!

    I went the one of those links and saw that that the following would give me better understanding. Does everone here understand now. Its not in my knowledge base!
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    var CloudGenerator = new Class({
        // Implement the Events and Options utility classes
        Implements: [Events, Options],
        // Initialize our defualt values for the class options passed in
        options: {
            totalClouds:  4,        // Total number of clouds on screen at a given time (int)
            minDuration: 10000,     // Minimum travel time for a cloud across the screen (milliseconds)
            maxDuration: 120000,    // Maximum tracel time for a cloud across the screen (milliseconds)
            checkInterval: 10000,   // The interval used to check if new clouds are needed (milliseconds)
            autoStart: true,        // Automatically starts the cloud generator by default (bool)
            sky: $("sky"),          // Default sky target resides in an element named "sky" (element)
            cloudImg: "cloud.png",  // Define default cloud image (path/url)
            cloudDirection: 0,      // 0 = left to right, 1 = right to left (int)
            cloudWidth: 573,        // Cloud width (px)
            cloudHeight: 262,       // Cloud height (px)
            cloudScales: [1, 0.8, 0.6, 0.4, 0.2],   // Define an array containing the sizes the cloud will be scaled to (%)
            maxAltitude: 600,       // This defines the vertical space you allow clouds to appear within the sky (px)
            cloudTransition: Fx.Transitions.linear  //Define the transition algorithm for the cloud movement
        cloudCheck: null,           // Initialize the vairable to hold the setInterval declaration
        cloudsInSky: 0,             // Keep track of number of clouds in sky
        cloudSky: null,             // A reference to the cloudSky generated and injected into the sky element
        // Our constructor for the CloudGenerator class
        // It takes in the options passed to it and uses the implemented Options
        // utility class to modify any defualt options in our options object
        initialize: function(options){
            // Modify any defaults with the passed in options
            this.setOptions(options);
            // Create Cloud Sky
            this.cloudSky = new Element('div', {
                id: 'cloudSky',
                src: this.options.cloudImg,
                styles: {
                    position: 'absolute',
                    width: (sky.getDimensions().x + (2*this.options.cloudWidth)),
                    left: -this.options.cloudWidth 
            // Place the cloud container within the sky
            // This lets us ensure that the clouds can smoothly enter and exit the
            // boundaries of the sky element
            sky.grab(this.cloudSky);
            // autostat the cloud generator by default
            if(this.options.autoStart){
                this.startGenerator();
        // Check if there are less than the max number of clouds in the sky
        // If there is room, deploy another cloud, if not, do nothing
        deploy: function(){
            var cloudScale = (Math.floor(Math.random()*this.options.cloudScales.length));
            cloudScale = this.options.cloudScales[cloudScale];
            var cloudDuration = Math.floor(Math.random() * (this.options.maxDuration + 1 - this.options.minDuration))
                                + this.options.minDuration;
            var cloudAltitude = Math.floor(Math.random() * (this.options.maxAltitude - (cloudScale * this.options.cloudHeight)));
            if(this.cloudsInSky < this.options.totalClouds && !this.cloudsFull){
                this.cloudsInSky++;
                new Cloud({
                    width: Math.floor(this.options.cloudWidth * cloudScale),
                    height: Math.floor(this.options.cloudHeight * cloudScale),
                    altitude: cloudAltitude,
                    duration: cloudDuration,
                    direction: this.options.cloudDirection,
                    cloudImg: this.options.cloudImg,
                    cloudTransition: this.options.cloudTransition,
                    onComplete: function(){
                        this.removeCloud();
                    }.bind(this)
        // Decrement cloudsInSky variable
        removeCloud: function(){
            if(this.cloudsInSky > 0){
                this.cloudsInSky--;
                console.log("cloud removed");
        // Stop the cloudGenerator
        stopGenerator: function(){
            clearInterval(this.cloudCheck);
            return "generator stopped";
        // Start the cloudGenerator
        startGenerator: function(){
            this.deploy();
            this.cloudCheck = this.deploy.periodical(this.options.checkInterval, this);
    var Cloud = new Class({
        // Implement the Events and Options utility classes
        Implements: [Events, Options],
        cloudId: "",    // hold a reference to this cloud's DOM id property
        options: {
            duration: 4000,         // Duration of the clouds movement across the sky (milliseconds)
            direction: 0,           // Direction of the clouds movement, 0 = left to right and vice versa (int)
            altitude: 200,          // Altitude of the cloud in the sky
            width: 573,             // Width of the cloud (px)
            height: 262,            // Height of the cloud (px)
            cloudImg: "cloud.png",  // Cloud image (path/url)
            sky: $("cloudSky"),     // CloudSky element that the cloud will be injected into (element)
            cloudTransition: Fx.Transitions.linear  //Define the transition algorithm for the cloud movement
        initialize: function(options){
            // modify any defaults with the passed in options
            this.setOptions(options);
            // create and animate the cloud element
            this.createCloud();
        createCloud: function(){
            this.cloudId = 'cloud-' + (new Date().getTime());
            // determine if cloud will be moving left to right or right to left
            // the position cloud offscreen to begin movement
            var cloudStyle = {
                position: 'absolute',
                top: this.options.altitude,
                width: this.options.width,
                height: this.options.height
            var skyPosition = 'upperRight'; // Move the cloud to the right, ignore the 'upper'
            var cloudEdge = 'upperLeft';    // Align the edge of the cloud to the edg edge of the sky
            // Determine the direction of the cloud and set styles and positions
            if(this.options.direction === 0){
                cloudStyle.left = (0 - this.options.width);
            else {
                cloudStyle.right = (0 - this.options.width);
                skyPosition = 'upperLeft';
                cloudEdge = 'upperRight';
            // Create the image element for the cloud
            var cloud = new Element('img', {
                id: this.cloudId,
                src: this.options.cloudImg,
                styles: cloudStyle
            // Add the cloud image element to the cloudSky div
            sky.grab(cloud);
            // Move the cloud across the sky
            new Fx.Move(cloud, {
                relativeTo: this.options.sky,
                position: skyPosition,
                edge: cloudEdge,
                offset: {x: 0, y: this.options.altitude},
                duration: this.options.duration,
                transition: this.options.cloudTransition,
                onComplete: function(){
                    this.complete();
                }.bind(this)
            }).start();
        complete: function(){
            $(this.cloudId).destroy();  // Remove the cloud element from the DOM
            this.fireEvent('complete'); // fire the onComplete event, this is picked up
                                        // by the CloudGenerator class

  • How do I make a simple time-spend, cost tracking sheet? (New to numbers)

    I could not find how to make a simple time-spend = cost tracking sheet for one customer at a time. It is hard for me to keep track of the time I use for arranging music in Logic and Sibelius. I was thinking like A=date, B=what was done, C=start working, D=end working, E=D-C time spend, F=charge for time spend. Sometimes I do work twice or more on a day? (set up E to calkulate total time and F the cost) I do not want to use special software or online service. Thank you for all your help.
    W.W.

    Walter Wedler wrote:
    I could not find how to make a simple time-spend = cost tracking sheet for one customer at a time. It is hard for me to keep track of the time I use for arranging music in Logic and Sibelius. I was thinking like A=date, B=what was done, C=start working, D=end working, E=D-C time spend, F=charge for time spend. Sometimes I do work twice or more on a day? (set up E to calkulate total time and F the cost) I do not want to use special software or online service. Thank you for all your help.
    W.W.
    Hi Walter,
    This topic as come up a couple of times in the past month or so, so a search of the forum should give you at least part of the answer.
    Aside from the formula in column F, you already have the solution.
    in F, the basic formula is =duration x rate
    In the spreadsheet, that is entered as =DUR2HOURS(E)*48
    if the rate is $48/hour
    The IFERROR function is used to avoid error triangles in the rows where column F does not contain a duration.
    Row 5 is a Footer row. The formulas in this row are simple SUM() statements; -=SUM(F) and =SUM(G)
    Column F shows an error because of the 0 (a number, not a duration) in Row 4.
    Regards,
    Barry

  • How can I make a simple 1 channel I/O with RS232?

    Hy all,
    I just want make a simple 1/0 output over RS232. How can I programme it in LabView? Noemaly we send datas over RS232, but I want just a High or a Low on the TxD (or may on DSR or CTS).
    Thanks
    Petric

    You are lucky, here is a 6.0 version ... I hope it works
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    DTR control 2.vi ‏10 KB

  • How can I make a simple slideshow on iDVD?

    As opposed to the majority of Apple apps that are "user-friendly" I find using iDVD a very awkward, un-friendly application. It offers "drop zones" without me understanding what I should "drop" into them.
    I just want to make a simple DVD of a slideshow with some background music ... nothing fancy. I don't need any theme and I don't need to add any movies.

    To simply create a slide show in iDVD 7 onwards from images in iPhoto or stored in other places on your hard disk or a connected server, look here:
    http://support.apple.com/kb/HT1089
    If you want something a bit more sophisticated:
    There are many ways to produce slide shows using iPhoto, iMovie or iDVD and some limit the number of photos you can use (iDVD has a 99 chapter (slide) limitation).
    If what you want is what I want, namely to be able to use high resolution photos (even 300 dpi tiff files), to pan and zoom individual photos, use a variety of transitions, to add and edit music or commentary, place text exactly where you want it, and to end up with a DVD that looks good on both your Mac and a TV - in other words end up with and end result that does not look like an old fashioned slide show from a projector - you may be interested in how I do it. You don't have to do it my way, but the following may be food for thought!
    Firstly you need proper software to assemble the photos, decide on the duration of each, the transitions you want to use, and how to pan and zoom individual photos where required, and add proper titles. For this I use Photo to Movie. You can read about what it can do on their website:
    http://www.lqgraphics.com/software/phototomovie.php
    (Other users here use the alternative FotoMagico:  http://www.boinx.com/fotomagico/homevspro/ which you may prefer - I have no experience with it.)
    Neither of these are freeware, but are worth the investment if you are going to do a lot of slide shows. Read about them in detail, then decide which one you feel is best suited to your needs.
    Once you have timed and arranged and manipulated the photos to your liking in Photo to Movie, it exports the file to iMovie  as a DV stream. You can add music in Photo to Movie, but I prefer doing this in iMovie where it is easier to edit. You can now further edit the slide show in iMovie just as you would a movie, including adding other video clips, then send it to iDVD 7, or Toast,  for burning.
    You will be pleasantly surprised at how professional the results can be!

  • How can we make a external web service call within tjspSelfRegistrationTile

    Hello Gurus,
    Can anybody tell me how can we include a JAVA code within the tjspSelfRegistrationTiles.jsp page? so that we can make a external web service call which includes the logic of validating the UDF values?
    The requirement is to validate the value of a field provided by the user on the OIM self registration page. If the user has provided invalid value for that particular field then the user should not be able to register himself - an error message should be displayed. I have to compare the value provided by the user with some already hard coded ones within the JAVA code. If the value of the field is one of the hard-coded ones then only the user should be able to register himself.
    Any Response/ideas/concepts truly appreciated.
    TIA,
    - oidm.

    Have you ever tried something like this?
    1) Create an error message definition where error code starts with Adapter. for example, ADAPTER.Invalid_TemporaryAccess_Dates.
    2) Create an entity adapter and assigns it to the Request object, pre-insert;
    3) Logic of your adapter
    Tests if the REQ_OBJ_ACTION is Create Entity
    Performs your validations
    Handles an error the validation is not ok
    Thanks,
    Renato.

  • How do I make a simple hatch pattern (for fill) of my own customization?

    Hello all,
    I must be over looking something here.  I am trying to make a hatch pattern in Illustrator CS6 with the pattern tool so I can apply a clean, single lined hatch to various shapes (some small some big - but the hatch needs to remain at the same seamless scale).  I understand that there is a Basic Graphics_Lines Pattern under the Swatches Palette, but I don't understand how to edit it with the Pattern Options dialogue box.
    I must be missing something, becuase I wouldn't think making a single line at 45° repeat at the same spacing for a shape fill would be that difficult.  I shouldn't have to make a line with the pan tool at a stroke of 1000 with a 0.1-3 dash and make a clipping mask should I?
    Basically I don't know how to make a pattern's lines match up when I do the 5x5 or 3x3.  I tried doing 1x1 and the result is that of the image with the red stroke...still not aligning.  Do I need to get mathematical with the size of the line i'm drawing and its stroke to allow H and V Spacing to work?
    I'm completely lost and would really appreciate if someone could help me understand this....It just seems so arbitrary. and all the examples/tutorials i've seen of this tool are of floral patterns where arbitrary is okay.
    Thanks,

    Create the pattern at either horizontal or vertical angle.
    Rotate after applying to the object.

  • How do I make a simple swf made up of a series of pictures the user advances by clicking?

    I'm shwoing a step by step process on how I did a photoshop piece, and I want to have a simple flash swf that goes through each of the screenshots at the viewer's pace, by them clicking. I wasn't even thinking so complicated as to include forward/back buttons, even just somethign so simple as having the entire image clickable to move 'forward' and when it gets to the end it just loops or something. super simple, i would do an animaged gif but i want it to be at the user's own pace. but if you think of how an animated gif cycles that's how simple i want it to be. also a few of fading/dissolivng between the images would be cool.
    Could anyone who knows flash give me some pointers?

    If you want simple, just place the images sequentially, one each per frame, along the timeline.  Then add an actions layer and place a stop(); command in the first frame of that layer.  Then add a button to the stage and code it to use nextFrame();  How you code it depends on which version of actionscript you are planning to use, but nextFrame works for either.  What nextFrame does is advances you to the next frame and stops, so you only need the one stop() on the timeline to have the movie stopped when it loads.
    The more features you want to add, the more complicated it gets, so for the moment I'll leave you with the most simplified approach above.
    If you want to have transitions between images, then you need to deal with adding timeline tweens that fade them in/out as desired.  Although, what you could do instead is have a movieclip on a layer above the images that fades in and out on command. The contents of it would simply be a rectangle graphic symbol that is the same color as the stage, but has its alpha value at 0 in the first frame (with a stop()), and then fades in and out again.  So the button controls the playing of that movieclip, and when that movieclip reaches the point where the rectangle is in full view, that movieclip commands the main timeline to advance to the nextFrame()

  • How do I make a simple voice recording that can be attached to an email?

    I want to record a short message, mp3 or any format is fine, and attach it to an email. I've tried opening Garage Band to do it, and downloaded Audacity, but I have no idea how to use either one. I have a microphone that plugs into the audio port, and know how to switch to "use audio port for sound input" in preferences. But I want a simple command that says "start recording" instead of the complicated control panels I see in the two programs I've looked at.

    dianefromeliot wrote:
    Thanks for the software suggestion - http://mac.softpedia.com/get/Audio/Audio-Recorder.shtml - it looks good. Why do you use it instead of Garage Band?
    Had it before GB existed; I use other audio software for other tasks, but this one is probably the most easy to use app (of any kind) I've ever used. Click, speak, click, click. Done, with file sitting on my desktop.

  • How do I make a simple pulldown bookmark menu like I used to have.

    Firefox used to have a simple pulldown menu for bookmarks. I can't seem to find it or make it work now.

    Do you mean on the classic menu bar? (File, Edit, View...) To display the menu bar, you can use any of these methods:
    * right-click a blank area of the tab bar > Menu Bar
    * right-click the "+" button on the tab bar > Menu Bar
    * tap the Alt key to activate the classic menu bar, then View > Toolbars > Menu Bar
    * click the "3-bar" menu button and use Customize to access the Show/Hide Toolbars list
    If you meant on the toolbar, the icon changed in Firefox 29. You should find a star, and next to it, something that looks like a clipboard. It's that button on the right which drops down your Bookmarks menu list from the toolbar.
    Any luck?

  • How do I make a simple DVD with chapters?

    I have a quicktime sequence that is saved with chapter markers exported from Final Cut Pro. The sequence is about 1hr30 min long, and has about 70 chapter markers. I just need a simple DVD that can play through the whole sequence, or have the ability to have an index where I can jump to any chapter. How can I do this...especially without using one of Apple's pre-designed templates? Is this something I could also do in iDVD?

    How can I do this...especially without using one of Apple's pre-designed templates? Is this something I could also do in iDVD?
    If you don't want to use an Apple-designed template, I'm not sure why you would want to do it in iDVD, as you can only use templates there.
    You need to go through the tutorial, first of all, to get familiar with the program.
    Then, you would import your movie that was exported with DVD chapter markers. Create however many menus you want (I would say 7-10) with 7-10 buttons on each. Link each button to hop to the appropriate chapter marker. Also provide a "play all" button on the first menu, or each menu, that links to the beginning of the track.
    If you want video thumbnails, you'll need to size buttons accordingly and may need to have less buttons per menu.
    PS: with that many chapters I'm not sure I'd classify this project as "simple." Simple in design, maybe, but it'll be quite a bit of work.

  • How can I make a simple Pendulum movement

    Hi,
    I am quite new to motion and at the moment I am thinking that I am tiring to run before I can walk this idea of mine.
    I am trying to make a repeating pendulum movement, like the movement of the Newtons cradle with the 4 balls, the energy of the swinging outer left ball is transferred to the outer right ball on contact etc. Each ball will show a short looping video footage.
    Is there a simple way of creating an arced motion path (upwards and outwards) for the first ball and then reversing it along the same motion path, but then copying this path to the opposite side, mirroring the complete movement?
    I have tried converting to a simple motion path to keyframes but I get into a bit of a mess.
    Any ideas?
    Thanks in advance.
    PowerMac 2x2.5GHz   Mac OS X (10.3.8)  

    I actually just did an animation based on that desk decor thing... it was easy once i figured out what to do...
    Now, i tought myself motion, so my way may not be the "best" or quickest but it worked. First...import the object/make the object or whatever. second, go to behaviors and take basic motion path. After that, take the bezier curve adjustment and arc the line. That will get you the object going up in a swing or down...depending on where you put the start point on the curve. After that, copy the actual motion curve, but put the new end point to where the old start point was...basically invert the motion (if there is a simpler way to do this please tell me). that will get the object to go up/down then down/up.
    So that gets the basic motion of a half swing.
    If your object hits another object (like in the desk thing) make sure your snap lines are on because youll need them to line up the motion. Do the same thing to the second object as you did to the first, but going the oposite way. The snap lines will help guide you to make sure the second object goes as high as the first. To make it look correct i pretty much eyeballed the connection of one object to the next going frame by frame. I also added the "ease at end" motion to the rising motion path to add a realistic touch.
    If this is confusing i'm sorry...

  • How do I make a simple square iBook?

    Hi. I'm a graphic designer / illustrator, and I've just made up a small children's book. I'd like to try turning it into an iBook, and assumed it would be simple for someone with desktop publishing skills, but I'm not finding iBooks Author that easy to figure out. I don't like using templates. My pages are already self contained images, and all I want to know is how to drop square images into square pages to form a square iBook with faux book effects? I'm sure it's possible, could someone please tell me how to adjust the document shape so it's not always rectangular? Thanks
    Andy

    We're going in circles....again - all ibooks using iBooks Authore in the store are obligated to be at least landscape...a rectangle long on the horizontal. You are free to set margins and crop to leave an occupied square inside that rectangle. You're free to fit your content inside any shape you like, but it will still reside inside a rectangle.
    There is no lever to pull otherwise and what you do to accomplish a particular layout of your choice/design is yours to do based on your content etc.
    You can't adjust pagination, tho. One page will always show in Portrait...two in landscape unless you're straddling, but never square, always rectangles.
    There are no purely square iBA ibooks. Square-looking layouts, yes - it takes rework to add margins to get that type of visual effect.
    Ken

Maybe you are looking for

  • Delivery date in Purchase Order

    Hi All, The production rplmnt purchase order is raised manually using ME21N. Could you please let me know how delivery date gets calculated and display in item overview section of purchase order? please treat this as urgent. Thanks

  • FCP Capturing & Audio

    I'm working with FCP 4 (purch. upgrade on Amazon - I know, I know I'm working in the dark ages), and can't hear audio thru my speakers when capturing; however the audio meter registers sound, and there is sound when playing back the clip after captur

  • I accidently deleted my wifi network, how do i get it back?

    i accidently deleted my wifi network in system preferences. How do i get it back? the signal in the right top corner has a cross in it and it says WIFI: Not configured. Does anyone know how i can get it back? Im not familiar with Mac.

  • Control surface and interface at the same time

    Is it possible to plug in a control surface and an interface at the same time? My plan is to use a Mackie Control Universal Pro (USB) for my control surface and a Focusrite Saffire Pro 40 IO Firewire Interface for monitor use during mixing. Will Logi

  • Send-OSCEXWelcomeMail command not working

    Hi I am having exchange 2010 sp3, trying to configuring welcome mail automation. I got a script from TechNet. Script is running perfectly. But iam not getting the welcome email. Tried Send-OSCEXWelcomeMail from exchange powershell prompt, but its not