How to activate service aftering mounting in systemd The Next CEO of Stack OverflowHow to set...
Unreliable Magic - Is it worth it?
How to solve a differential equation with a term to a power?
How to start emacs in "nothing" mode (`fundamental-mode`)
Indicator light circuit
Why do airplanes bank sharply to the right after air-to-air refueling?
Why do we use the plural of movies in this phrase "We went to the movies last night."?
Why has the US not been more assertive in confronting Russia in recent years?
How do I transpose the 1st and -1th levels of an arbitrarily nested array?
Multiple labels for a single equation
Are there any limitations on attacking while grappling?
Is it possible to search for a directory/file combination?
Has this building technique been used in an official set?
Limits on contract work without pre-agreed price/contract (UK)
Bold, vivid family
Why do remote companies require working in the US?
Why does the UK parliament need a vote on the political declaration?
To not tell, not take, and not want
Elegant way to replace substring in a regex with optional groups in Python?
How powerful is the invisibility granted by the Gloom Stalker ranger's Umbral Sight feature?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Why don't programming languages automatically manage the synchronous/asynchronous problem?
Several mode to write the symbol of a vector
What was the first Unix version to run on a microcomputer?
Novel about a guy who is possessed by the divine essence and the world ends?
How to activate service aftering mounting in systemd
The Next CEO of Stack OverflowHow to set environment variable in systemd service?Suddenly mysql/mariadb won't startFind the location of a systemd serviceDo systemd unit files have to be reloaded when modified?Start systemd service conditionally?OEL 7.2 with LACP systemd shutdowns networking before umounting _netdev filesystemsSystemd service: Failed to issue method call: Unit service failedKilling systemd service with and without systemctlsystemctl stops Tomcat service immediately after startDisabling systemd messages that interfere with running BASH script
I want to mount aria2c
service after mount mnt-usb.mount
. The following config file work as expected but after mnt-usb.mount
inactive and active again (because of unpluging and plug the device again) the aria2c
not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target
systemd systemctl
add a comment |
I want to mount aria2c
service after mount mnt-usb.mount
. The following config file work as expected but after mnt-usb.mount
inactive and active again (because of unpluging and plug the device again) the aria2c
not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target
systemd systemctl
add a comment |
I want to mount aria2c
service after mount mnt-usb.mount
. The following config file work as expected but after mnt-usb.mount
inactive and active again (because of unpluging and plug the device again) the aria2c
not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target
systemd systemctl
I want to mount aria2c
service after mount mnt-usb.mount
. The following config file work as expected but after mnt-usb.mount
inactive and active again (because of unpluging and plug the device again) the aria2c
not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target
systemd systemctl
systemd systemctl
asked 4 mins ago
o0omycomputero0oo0omycomputero0o
1162
1162
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960719%2fhow-to-activate-service-aftering-mounting-in-systemd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960719%2fhow-to-activate-service-aftering-mounting-in-systemd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown