Skip to content

Instantly share code, notes, and snippets.

@FlorianHeigl
Created August 25, 2018 09:34
Show Gist options
  • Select an option

  • Save FlorianHeigl/0b5e9e0b307072050627992e2e5e569b to your computer and use it in GitHub Desktop.

Select an option

Save FlorianHeigl/0b5e9e0b307072050627992e2e5e569b to your computer and use it in GitHub Desktop.
FrOSCon
[Unit]
Description=ASCII telnet server
After=network.target
[Service]
Type=simple
WorkingDirectory=/srv/movie
ExecStart=/usr/bin/python ascii_telnet_server.py --standalone -f sample_movies/sw1.txt
RemainAfterExit=true
#ExecStop=/opt/foo/teardown-foo.sh
StandardOutput=journal
[Install]
WantedBy=multi-user.target
{
"type": "ncf_technique",
"version": 1,
"data": {
"bundle_args": [],
"bundle_name": "Star_Wars",
"description": "",
"name": "Star Wars",
"version": "1.0",
"parameter": [],
"method_calls": [
{
"args": [
"git-core",
"",
"",
"",
""
],
"class_context": "any.(ubuntu|suse)",
"method_name": "package_state",
"promiser": "method_call"
},
{
"args": [
"git",
"",
"",
"",
""
],
"class_context": "any.(centos)",
"method_name": "package_state"
},
{
"args": [
"/srv/movie"
],
"class_context": "any",
"method_name": "directory_check_exists",
"promiser": "method_call"
},
{
"args": [
"git clone https://github.com/nitram509/ascii-telnet-server.git /srv/movie",
"0",
"0"
],
"class_context": "any.(directory_check_exists__srv_movie_error)",
"method_name": "command_execution_result",
"promiser": "method_call"
},
{
"args": [
"/usr/lib/systemd/system/ascii_telnet_server.service",
"[Unit]\nDescription=ASCII telnet server\nAfter=network.target\n\n[Service]\nType=simple\nWorkingDirectory=/srv/movie\nExecStart=/usr/bin/python ascii_telnet_server.py --standalone -f sample_movies/sw1.txt\n\nRemainAfterExit=true\n#ExecStop=/opt/foo/teardown-foo.sh\nStandardOutput=journal\n\n[Install]\nWantedBy=multi-user.target",
"true"
],
"class_context": "any",
"method_name": "file_content",
"promiser": "method_call"
},
{
"args": [
"systemctl daemon-reload"
],
"class_context": "any.(file_lines_present__usr_lib_systemd_system_ascii_telnet_server_service_repaired)",
"method_name": "command_execution",
"promiser": "method_call"
},
{
"args": [
"ascii_telnet_server"
],
"class_context": "any",
"method_name": "service_started",
"promiser": "method_call"
},
{
"args": [
"ascii_telnet_server"
],
"class_context": "any",
"method_name": "service_enabled",
"promiser": "method_call"
}
]
}
$
@FlorianHeigl
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment